tags:

views:

26

answers:

1

Hello friends..

 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 concersn here is.. I am displying A B C D values from db2... for Last Column D I need to put defalut drop down list for all the rows.

Thanks can any body help me out..

thanks

+1  A: 

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
Anurag
Yes I included that too? but its not working for me.. here is the column I decalred.. { name: 'Resolution Code',editype:true, index: 'Resolution Code', edittype: 'select', width: 100, editoptions: { value: { 1: 'Resolved by Specialist', 2: 'No Error-Market Conditions'}} }, ],
kumar
the `edittype` property is repeated in the code you've pasted above, and there is no `editable`. if it's not working, can you provide a link where the problem is reproducible? use http://jsfiddle.com if you want to setup a quick demo.
Anurag