Dropdown Undefined

QuestionsDropdown Undefined
Greg asked 9 years ago

Hi,

I want to have a drop-down for users to select from in my grid. It is not tied to a back-end database table.

I have tried the following code and it "seems" to work, but when I got to edit the table it comes up as "undefined" each time.

$col["edittype"] = "select"; // render as select
$col["editoptions"] = array("value"=>'Black (Home):Black (Home);White (Away):White (Away);');

Thank you – Greg

2 Answers
Abu Ghufran answered 9 years ago

It could be due to last semi colon after (Away);

Replace:

$col["editoptions"] = array("value"=>'Black (Home):Black (Home);White (Away):White (Away);');

to:

$col["editoptions"] = array("value"=>'Black (Home):Black (Home);White (Away):White (Away)');

Greg answered 9 years ago

This worked perfectly thanks.

Your Answer

20 + 19 =

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?