jQWidgets Forums

jQuery UI Widgets Forums Grid dropdown weird behavior

This topic contains 2 replies, has 2 voices, and was last updated by  tompasto 11 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • dropdown weird behavior #49900

    tompasto
    Participant

    Hello, i have insert a dropdown menu on a jqxgrid, populate by an Json query.
    An example is better than word so i capture the behavior and lay it on youtube: https://www.youtube.com/watch?v=3jI9GY-_GjI

    As you can see on my first dropdown column every time i clic on it i got the ‘please choose message’ that not appear on my second dropdown column (that’s what i want).
    Also the value is automatically change on the first clic i do (after it value stay as default, that’s what i want).

    As my english is pretty bad, please look at the video for a better idea of the problem.
    Here my cell codes for both dropdown:

    { text: ‘LISTE’, columntype: ‘dropdownlist’, datafield: ‘LISTE’, width: 200
    , initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: dataAdapter, displayMember:”WLdescr”,valueMember: “CODE” }); }
    , cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) return oldvalue;}

    },

    { text: ‘STATUT’, columntype: ‘dropdownlist’, datafield: ‘WL_STATUS’, width: 140
    , initeditor: function (row, cellvalue, editor) {
    editor.jqxDropDownList({ source: WLstatusdata, displayMember:”DESCRIPTION”,valueMember: “CODE” });
    }
    , cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) return oldvalue;}
    },

    dropdown weird behavior #49910

    Peter Stoev
    Keymaster

    Hi tompasto,

    The problem I see in the provided code is that the DropDownList’s data source is updated unnecessary each time the editor is opened. To set the data source, use the “createeditor” callback. To update the selected item, use the “initeditor” callback.

    Best Regards,
    Peter Stoev

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

    dropdown weird behavior #50014

    tompasto
    Participant

    It works, Thanks !

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

You must be logged in to reply to this topic.