jQuery UI Widgets Forums Lists DropDownList dropdownlist to update a grid row data not loading row value

This topic contains 2 replies, has 2 voices, and was last updated by  claudegel 8 years ago.

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

  • claudegel

    I have a grid with a popupwindow to edit/update each row. If I add or edit data in a row, when I edit another row then the dropdownlist in the popup is keeping the selected value of the last time I open the dropdownlist. It is not loading the value of the row I want to edit.
    What should I do to pass the cell row value to the dropdownlist before openning the popup window to edit that row. The dropdownlist have checkboxes: true as parameter.

    // get the clicked row's data and initialize the input fields.
                               var dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow);
                         -->   $("#spec_list").jqxDropDownList('val',dataRecord.probleme);
                               // show the popup window.

    $(“#spec_list”).jqxDropDownList is keeping the value of the last time I’ve selected item in the drop down list and the values of the selected row are not checked

    how do I pass de selected row value to the dropdownlist


    Hello claudegel,

    If checkboxes are enabled, you would have to set the dropdownlist’s selection with the checkItem method. If the cell contains comma-separated values, you can split them and call checkItem multiple times.

    Best Regards,

    jQWidgets team


    Ok it work like this:
    I’d to first uncheckall before using checkitem

                               var check = dataRecord.probleme;
                               var checkit = check.split(",");
                               for (i = 0; i < checkit.length; i++) {
                            	   $("#spec_list").jqxDropDownList('checkItem', checkit[i]);

    maybe I can use directly
    var checkit = dataRecord.probleme.split(",");

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

You must be logged in to reply to this topic.