jQuery UI Widgets Forums Grid Sorting of Filter DropDownList Options

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

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Sorting of Filter DropDownList Options #31495

    mtbvfrAgain
    Blocked

    Good morning/afternoon jQWidgets Team,

    The population of the Filter DropDownLists, should be based on an Array using a JSON structure for a Name/Value pair of Fields (Object Properties) for each row. The Value could then be used to search a similarly structured JSON Array for the Filter Condition that needs to be applied.

    At present the DropDownLists are based on an Array of 1 Dimension with a fixed order to match the 1 Dimensional Array of Filter Conditions.

    This is poorly designed and doesn’t allowed the list to be sorted.

    A sorted list is easier to read.

    Sorting the list, with the current data structure, will require code to map the Selected Option to the Matching Filter Condition and use the “addfilter” and “applyfilters” methods. This would be unnecessary if the Data Source and associated code, for these DropDownLists, was better designed.

    Also, what happens when the options should be displayed in other languages besides English? There should be an API Property that allows a Programmer to assign a JSON structured Array for this purpose.

    Hasta pronto, Michael.

    Sorting of Filter DropDownList Options #31496

    mtbvfrAgain
    Blocked

    P.S. Why can I not access the Dashboard. :/

    Sorting of Filter DropDownList Options #31500

    Peter Stoev
    Keymaster

    Hi mtbvfrAgain,

    DropDownList Filters are sorted by default – http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/filterrow.htm?arctic. You can check that on our demos as well.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Sorting of Filter DropDownList Options #31503

    mtbvfrAgain
    Blocked

    Hi Peter,

    I’m referring to the DropDownLists, for the Grid Menu, for which the options are as follows.

    filterstringcomparisonoperators:[“empty”,”not empty”,”contains”,”contains(match case)”,”does not contain”,”does not contain(match case)”,”starts with”,”starts with(match case)”,”ends with”,”ends with(match case)”,”equal”,”equal(match case)”,”null”,”not null”]

    Also, Why can I not access the Dashboard?

    Hasta pronto, Michael.

    Sorting of Filter DropDownList Options #31504

    Peter Stoev
    Keymaster

    Hi mtbvfrAgain,

    1. If you wish you can sort these by localizing the Grid. The default design is different and we do not plan to make any changes.
    2. I do not know.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Sorting of Filter DropDownList Options #31506

    mtbvfrAgain
    Blocked

    Peter,

    I do not believe that setting filterstringcomparisonoperators to a different order will work because the result is the same as using “.sort()” and the options will still not be aligned with the array in jqxData.js as shown below.

    ["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"]

    When an option is selected from the DropDownList the “selectedIndex” value is used to search and make a selection from the above array in jqxData.js. This selection is then used by the jQWidgets code to create and apply a filter.

    So, it appears to me that the design needs to be changed to make it more flexible.

    Hasta pronto, Michael.

    Sorting of Filter DropDownList Options #31508

    Peter Stoev
    Keymaster

    Hi mtbvfrAgain,

    I suggest you to look at the filtering samples available online. The process of changing these strings is already demonstrated. The design is already flexible enough as you may see from the samples.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.