问题描述:

Am trying to load Columns to JQGrid Dynamically using Ajax calls as mentioned here jqGrid and dynamic column binding

i just did a sample with 1 column. My Column name JSON

"Data":["Airport"] which working just fine.

and the issue is with ColumnModel JSON below

{"colModelData":{"items":[{"name":"Airport"}]}

Itz not working. How do i need to change my JSON so that JQGrid accepts

how can i make it work ??

Thanks

网友答案:

I think that you just use the posted data in the wrong way. Probably you use colModel: result.colModelData instead of colModel: result.colModelData.items which more corresponds the JSON data.

By the way you can use label property in items of colModel and don't specify any colNames.

相关阅读:
Top