开发者

how to make grid column as drop down list for all rows using jquery

colNames: ['A','B','C','D'],
                colModel: [
                      { name: 'A', index: 'A', width: 90 },
                      { name: 'B', index: 'B', width: 100 },
                      { name: 'C', index: 'C', width: 70 },
                      { name: 'D', index: 'D', edittype: 'select', width: 100, editoptions: { value: { 1: 'Yes开发者_运维技巧', 2: 'No'}} }

                    ],

My concerns here is, I am displaying A B C D values from db2... for Last Column do I need to put default drop down list for all the rows.


Looks like you are missing the editable property in D's definition:

{
    name: 'D',
    index: 'D',
    edittype: 'select',
    width: 100,
    editable: true,
    editoptions: { value: { 1: 'Yes', 2: 'No' } }
}

Without the editable property, it won't work as far as I know, but i could be wrong. For a working example and code, you can see these resources:

  1. A simplified version on jsfiddle
  2. jqGrid demos - Row Editing > Input Types
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜