Can add dropdown manually

QuestionsCan add dropdown manually
Mohamed Akbar asked 8 years ago

Hi,
Can i add drop-down manually, without using db?(To load values manually,search based drop-down column,Update column in drop-down)

4 Answers
Abu Ghufran answered 8 years ago

Pasting from docs:
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);

Mohamed Akbar answered 8 years ago

Dear Mr Abu,

Thank you so much..Working fine..

Abu Ghufran answered 8 years ago

Hello,

In your JS code, you can call …
var rowid = jQuery("#list1").jqGrid('getGridParam','selrow'); // returns rowid or null if no row is selected (single row)

Return array of id's of the selected rows when multiselect options is true. Empty array if not selection
var selr = jQuery('#list1').jqGrid('getGridParam','selarrrow');

where list1 is grid id.

Eng Rassam answered 8 years ago

Hi how are you okay if i use multiselect how i can get it's selected value in Add function or when i use my custom add funcation
please let me know
Regards

Your Answer

7 + 4 =

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?