jQuery UI Widgets Forums Grid DropDownList in Grid

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • DropDownList in Grid #32800

    tech01230
    Member

    Hi,
    I am new to Jqxgrid.using jqxgrid and dropdownlist inside cell.

    the dropdown shows the options only when click on cell and not retains the selected value.Please guide me to fix above issues

    code sample: column definition as follows

    {
    text: ‘Level’,
    editable: true,
    columntype: ‘dropdownlist’,
    datafield: ‘ELevel’,
    width: “40%”,
    resizable: true,
    createeditor: function (row, column, editor) {
    var list = [{ LevelId: 1, ELevel: ‘Level1’ }, { LevelId: 2, ELevel: ‘Level2’ }, { LevelId: 3, ELevel: ‘Level3’ }];
    editor.jqxDropDownList({ autoDropDownHeight: true, source: list, displayMember: ‘ELevel’, valueMember: ‘LevelId’ });
    },

    // TRIED TO ASSIGN VALUE ALSO
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    $(“#grdList”).jqxGrid(‘setcellvalue’, row, ‘ELevel’, newvalue);
    if (newvalue == “”) return oldvalue;
    }
    },

    DropDownList in Grid #32829

    Peter Stoev
    Keymaster

    Hi tech01230,

    This sample: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/gridkeyvaluescolumnwitharray.htm?arctic shows how to create a DropDownList column. The Product column in this sample: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/cellediting.htm?arctic is with a DropDownList editor, too.

    Best Regards,
    Peter Stoev

    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.