Hi all,
how can i read the value and not the label in a dropdown list assigned to a cell of the grid?
I use the rowdata.fieldname but i obtain the label and not the value of the dropdown list. I need to sendo it in an HTTP GET so ai need the value and not the label.
This is an example in the grid:
{ text: \’TIPO PIANO\’, datafield: \’tipo_piano\’,columntype: \’dropdownlist\’, width: 100,
createeditor: function (row, column, editor) {
editor.jqxDropDownList({ autoDropDownHeight: true,source: pianoAdapter, displayMember: \’label\’, valueMember: \’value\’ });
}
},
And this is the configuration of the dropdown
var pianoDrop = [
{ value: “0”, label: “NA” },
{ value: “1”, label: “OPEN” },
{ value: “2”, label: “ZERO” }
];
var pianoSource =
{
datatype: “array”,
datafields: [
{ name: \’label\’, type: \’string\’ },
{ name: \’value\’, type: \’string\’ }
],
localdata: pianoDrop
};
var pianoAdapter = new $.jqx.dataAdapter(pianoSource, {
autoBind: true
});
Thanks