jQWidgets Forums

jQuery UI Widgets Forums Grid reading the value in a dropdown cell

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • reading the value in a dropdown cell #60671

    daddetim
    Participant

    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

    reading the value in a dropdown cell #60697

    Dimitar
    Participant

    Hello daddetim,

    Please take a look at the forum topic editor.jqxDropDownList: Saveing valueMember instead of displayMember for more information.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.