Column Options – One column as a drop down select

QuestionsColumn Options – One column as a drop down select
Mike asked 10 years ago

Hello, I am brand new to PHP Grid, and I am trying to make it so one single column in my database table is a dropdown menu. However, when I put in the $col and the $g->set_columns I get 'Please specify tablename or select command'. If I take the set_columns out, it works find and all of my $grid options work fine but none of the $col options. I also do not know where to put the $col options. I have 9 total columns including the ID, but I just want one to be a drop down menu. Any help is greatly appreciated. Thanks in advance!

3 Answers
Abu Ghufran answered 10 years ago

You must set:

$g->table = "blah";

before using set_columns.

I would recommend to make changes in similar readymade demos, and then modify the grid by checking docs/faqs.r

Mike answered 10 years ago

OK, the $g->table worked to show the table again, however I still have no dropdown. Where exactly do I put the $col[] options?

Abu Ghufran answered 10 years ago

I am emailing you demo files.
It's part of full package, demos/appearance/dropdown.php

Your Answer

16 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?