0

Using free JqGrid, I am loading the editOptions via a jquery ajax call, I also have a jsonMap for the element, now when using formatter:'select', it does not display the description of the option but rather the value

I have already tried building the formatter, the drop down shows up but does not have the selected value

{

                    name:'position_code',
                    index:'position_code',
                    sortable: true,
                    sorttype:'text',
                    width:200,
                    editable: true,
                    edittype:"select",
                    editoptions:{
                        value: function(){ 
                            return buildDropDown(drpPosition,"");
                        }

                    },
                    formatter:'Select',
                    /* 
                     formatter:function(){ 
                            return "<SELECT>"+buildOptions(drpPosition,"")+"</SELECT>";
                    }, 
                    formatoptions: {disabled : false}, */

                    jsonmap:function(row){
                                return row["position_code"].val;
                    }
                },

So let us say the values of buildDropDown(drpPosition,""); returns "1:one,2:two,3:three" etc

and the value of the row["position_code"].val = 2

I expect it to show two on the grid but it shows 2

1 Answers1

0

The code in JavaScript is case sensitive. You have put in code

formatter : 'Select',

which is not correct. It should be:

formatter : 'select',

Hope it will solve your problem

Tony Tomov
  • 3,122
  • 1
  • 11
  • 18