Dropdown not from database

QuestionsDropdown not from database
Samsun asked 11 years ago

Hello,

How must i do if my dropdown not from database. Example: Jan, Feb, etc.

Regards,
Samsun

3 Answers
Abu Ghufran answered 11 years ago

Render as select (dropdown), with these values "key:value;key:value;key:value"

$col["edittype"] = "select";
$col["editoptions"] = array("value"=>'10:$10;20:$20;30:$30;40:$40;50:$50');

// For multiselect, you probably need to write custom on_update handler
$col["editoptions"] = array("value"=>'10:$10;20:$20;30:$30;40:$40;50:$50', "multiple" => true);

Samsun answered 11 years ago

Hello,
I try follow your advice, but in grid show not the vale. Example: 1:january, the show is 1.

Abu Ghufran answered 11 years ago

Try setting

$col["formatter"] = "select";

If still not resolved, email me code for review.

Your Answer

20 + 8 =

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?