Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
1,508
Widok
0
21/06/2018 1:30 pm
Topic starter
example
1 Answer
0
21/06/2018 1:33 pm
Topic starter
1. script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
$("#jqGrid").jqGrid({ url: 'user/list_ajax', datatype: "json", colModel: [ { name: 'user_roles', width: 105, align: 'center', editable: true, formatter: 'select', edittype: 'select', editoptions: { dataUrl: "user/select2_roles", multiple: true, defaultValue: 'IN', dataInit: function (elem) { $(elem).select2({ placeholder: "my text for select2", allowClear: true, language: "ru" }); } } }, ], ... |
$("#jqGrid").jqGrid({ url: 'user/list_ajax', datatype: "json", colModel: [ { name: 'user_roles', width: 105, align: 'center', editable: true, formatter: 'select', edittype: 'select', editoptions: { dataUrl: "user/select2_roles", multiple: true, defaultValue: 'IN', dataInit: function (elem) { $(elem).select2({ placeholder: "my text for select2", allowClear: true, language: "ru" }); } } }, ], ...
2. prepare dataUrl: ”user/select2_roles”, this page must generate select html code, example:
1 2 3 4 |
Alabama Wyoming Afdsf 4fdsf |
Alabama Wyoming Afdsf 4fdsf
3. not perfect