jQWidgets Forums

jQuery UI Widgets Forums Grid How to set dropdown value inside grid

Tagged: ,

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

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

  • jishnu2026
    Participant

    i need to set dropdown list value in jqx grid
    my code shown below

    jqx grid:
    {
    text: ‘city’, columntype: ‘dropdownlist’, datafield:’cityid’, width: “17%”,dropDownHeight: 250,
    initeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
    editor.jqxDropDownList({ source: citylist, displayMember: ‘cname’, valueMember: ‘cityid’ });

    },
    }

    $(‘#Ddldistrict’).on(‘select’, function (event) {
    var args = event.args;
    var item = args.item;
    // get item’s label and value.
    practpub = item.label;

    $(“#jqxgridd”).jqxGrid(‘val’, 0, “cityid”, item.value); //set city

    });

    $(‘#Ddldistrict’).on(‘select’, function (event) {
    var args = event.args;
    var item = args.item;
    // get item’s label and value.
    practpub = item.label;

    $(“#jqxgridRegBilling”).jqxGrid(‘val’, 0, “nPraID”, item.value);

    });


    Peter Stoev
    Keymaster

    Hi jishnu2026,

    1. jqxGrid does not have val method.
    2. If you want to set the source of DropDownList editor, use the “createeditor” callback.
    3. If you want to update the value of a custom DropDownList editor, implement the “initeditor” callback and use the appropriate DropDownList API for setting its value.

    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.