jQuery UI Widgets Forums Grid Multiple "Please Choose:" in the filter drop-down on using render

This topic contains 6 replies, has 4 voices, and was last updated by  admin 3 years ago.

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

  • roshini.dav
    Participant

    http://jsfiddle.net/RuSjf/103/

    This is from your API example. I just added filters to it.
    Select a first name from the drop-down, say “Andrew” and then press “Render”.
    Notice that there are two “Please Choose: ” at the top.

    Thanks,
    Roshini


    Stanislav
    Participant

    Hello Roshini,

    Thank you for reporting this issue.
    When it is resolved it will be mentioned in our Release History.

    Best Regards,
    Stanislav

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


    roshini.dav
    Participant

    Hi thank you.
    I will try to find a javascript solution in the meantime.

    Thanks,
    Roshini


    EricK
    Participant

    Hello jqwidget team,
    Have we solved this issue. I have a similar issue when I set the filter value when the grid is being initialized.
    `var statusColumnFilter = function () {
    var filtergroup = new $.jqx.filter();
    var filter_or_operator = 1;
    var filtervalue = ‘Open’;
    var filtercondition = ‘starts_with’;
    var filter = filtergroup.createfilter(‘stringfilter’, filtervalue, filtercondition);
    filtergroup.addfilter(filter_or_operator, filter);
    return filtergroup;
    }();
    $(‘#grid’).jqxGrid….
    { text: ‘Status’, groupable: true, datafield: ‘statusname’, filtertype: ‘list’, filter: statusColumnFilter, filteritems: statusadapter, filtercondition: ‘starts_with’, width: 80}
    });

    I have tried multiple options with createfilterwidget, but could not find a solution. I think it calls the jqxDropDownList module mutilple times which produces the multiple entries for Please Choose.
    Could we find some type of solution that will work.
    Eric

    • This reply was modified 3 years, 1 month ago by  EricK.

    EricK
    Participant

    Hello everyone,
    The solution to the additional ‘Please Choose’ option being added to the drop down list multiple times is in the jqxgrid.filter.js module.
    Under the _updatelistfilters function(b,c)…
    Original code:

    n.items.length != s && s > 0 && n.host.jqxListBox(“indeterminateIndex”, 0, !0, !1)
    }
    } else if (null == n.getItem(this.gridlocalization.filterselectallstring) && n.insertAt({
    label: this.gridlocalization.filterchoosestring,
    value: “”
    }, 0);

    Changed to:

    n.items.length != s && s > 0 && n.host.jqxListBox(“indeterminateIndex”, 0, !0, !1)
    }
    } else if (null == n.getItem(this.gridlocalization.filterselectallstring) && n.updateAt({
    label: this.gridlocalization.filterchoosestring,
    value: “”
    }, 0);

    I have tested all of the demo examples and other samples on your site with new code and no issues have developed.
    Let me know if anyone experiences problems with the change.

    • This reply was modified 3 years, 1 month ago by  EricK.

    EricK
    Participant

    Hello All,
    Disregard the previous post if you setup the apply filter using the grids ready: function().
    The problem only occurs when the filter is applied during the grid initialization.
    Using the following method will duplicate the ‘Please Choose’ option being added multiple times.

    { text: ‘Company’, groupable: true, datafield: ‘companyname’, filter: applyfilter, filtercondition: ‘starts_with’, width: 150 },

    So, the solution is not to change the jqxgrid.filter.js module, but to apply the filter once the grid is ready.

    Sorry for any confusion.
    Erick


    admin
    Keymaster

    The issue is planned for resolution for jQWidgets ver.6.0.7.

    Thank you all for the feedback.

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

You must be logged in to reply to this topic.