开发者

JQGrid - How Can I populate dropdownlist in searchoption from MVC

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜