开发者

JQGrid - How Can I populate dropdownlist in searchoption from MVC

开发者 https://www.devze.com 2023-01-22 10:19 出处:网络
I found this code for populate searchoption editoptions: { value: \"List:School\" }, stype: \'select\',

I found this code for populate searchoption

editoptions: { value: "List:School" }, stype: 'select',
searchoptions: { value: "List:L开发者_JAVA百科ist Prices;School:School Prices" }

But I want to Populate it from Data in Controller use some JQuery Ajax like this

$.getJSON(url, function (data) 

How can I do it.Thanks !


Look at another my answer. The dataUrl and buildSelect parameter of the searchoptions works exactly like the same parameter of the editoptions. So you can use the same code.

If you want have different values and display names inside of drop-down list you can make a simple modification in the code from the answer. I hope it will be no problem you you.

0

精彩评论

暂无评论...
验证码 换一张
取 消