Using JQGRID 4.2.0 there is a bug when setting the default selected value when a dropdown list is loaded in a grid.
|
|
The reason for this is that in jQuery.jqGrid.js it uses the value to set selected in the dropdown list and not the text.<br /> <br /> Replace<br /> if (a.inArray(a.trim(a(this).text()), n) > -1 || a.inArray(a.trim(a(this).val()), n) > -1) this.selected = "selected"<br /> <br /><br /> with:<br /> if (a.inArray(a.trim(a(this).text()), n) > -1){<br /> <br /> Where the case "select" in the createEl function |
|
|
This is a bug as the default value to be selected should ALWAYS be the text which appears in the grid before the row is selected. |
|
|
Hopfully this can be fixed in future jquery grid releases. |