Dropdown – options and values

QuestionsDropdown – options and values
Thomas Kälber asked 1 year ago

Hello,

in our database we have a column called “Usage”.
There are values stored like “1,2,3…”

1 stands for “Own”
2 stands for “Foreign”
3 stands for “Cancelled”

So we do not understand how to configure the dropdown for the data grid.
In “usual” PHP it looks like this:

<option value=”1″>Own</option>
<option value=”2″>Foreign</option>
<option value=”3″>Cancelled</option>

Thank you with kind regards,
Thomas

6 Answers
Thomas answered 1 year ago

Hi,

thank you.
inserted the code

$col[“edittype”] = “select”;
$col[“editoptions”] = array(“value”=>’1:Own;2:Foreign;3:Cancelled);

So now we can choose from the dropdown where options are displayed,- but in the tale itself still we only see 1,2 or 3…!?Here we need the options to be displayed, not the values.

Regards,
Thomas

Thomas answered 1 year ago

Please…

this is very important for us!

Thomas answered 1 year ago

Hellohooo!

Is there anybody out there??

We need this function very urgent!

So please help,- we’re already waiting for weeks now!

Abu answered 1 year ago

Perhaps you just need to set:

$col[“formatter”]=”select”;

This will display label instead of values.

 

You can also refer demos/appearance/dropdown samples.

 

Thomas answered 1 year ago

Thank you so much!

Not “perhaps” but sure,- this was the perfect solution!   …finally…

Your Answer

0 + 18 =

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?