tags:

views:

167

answers:

1

I have a jGrid with an editable column some_other_id that has a select dropdown with keys/values of 1:A,2:B,3:C. I want the selected choice in each row to display the text value of the choice (e.g. 'A', 'B', 'C'), not the ID (1, 2, or 3). It currently displays the ID.

colModel :[
    { label: 'ID', name:'id' },
    { 
        label: 'Some Other ID',
        name: 'some_other_id',
        editable: true,
        align: 'center',
        edittype: "select",
        editoptions: {value:"1:A,2:B,3:C"}
    },
],

How to make it display the selected text value from editoptions instead?

A: 

It does not seem like this should matter, but the jqGrid documentation uses the following syntax:

value: {1:'A',2:'B'}

Alternatively, I have used the following syntax in my application:

value: "5:'A';4:'B'"

Give those a try and see if that makes a difference in your application.

Justin Ethier