jQWidgets Forums

jQuery UI Widgets Forums Grid Filter / search nested grids

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Filter / search nested grids #67631

    Bassant
    Participant

    Hi,
    I’m using nested grids, how can I filter over the nested grids as well ?!!

    I need to have a search input field, generic one, so that when I write any text that may match any cell either in the main level or any of its n-levels, it can retrieves it. Is it possible ??

    Note: After filtering I still have to display it as nested even if the matching cell is in one of the n-levels, because I have drag functionality which is applied only on the main level.

    for ex.

    | First Name | Last Name | age
    _______________________________________
    > | John | Alex | 20
    ————————————–
    Car ID | Car Color
    ___________________
    J1 | Red
    ——————-
    J2 | Blue
    ————————————–
    > | Frank | Dan | 30
    ————————————–
    Car ID | Car Color
    ___________________
    F1 | Black
    ——————-
    F2 | White

    … and so on.

    So if I write in the search “white”, I need to display the result as :

    | First Name | Last Name | age
    _______________________________________
    > | Frank | Dan | 30
    ————————————–
    Car ID | Car Color
    ___________________
    F1 | Black
    ——————-
    F2 | White

    OR as:

    | First Name | Last Name | age
    _______________________________________
    > | Frank | Dan | 30
    ————————————–
    Car ID | Car Color
    ___________________
    F2 | White

    Thanks in advance.

    Regards,
    Bassant

    Filter / search nested grids #67632

    Peter Stoev
    Keymaster

    Hi Bassant,

    Unfortunately, we do not have such functionality in jqxGrid. The Filtering is applied on the Grid. Nested Grids are within Row Details and in general the parent Grid does not know and does not care what content is displayed within the Row Details. It filters the Cell Values only. In your scenario, you will probably have to write some custom code, create filter objects and apply them to your Grid and Nested Grids with API function calls.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Filter / search nested grids #67633

    Bassant
    Participant

    Hi Peter,

    Okay, I have no problem, but it is doable, right ?

    I’ll have to:
    1- create a custom filter.
    2- loop on ALL the cells (main & nested) and evaluate this filter with each.
    3- keep track of the results and their relations with each other.
    4- update the grid’s source again.

    But wouldn’t that affect the performance ?!! I think it will be killed 😀
    Taking into consideration that normally now I already have a performance issue on updating the grid it takes about 6 – 8 seconds 🙁

    Thanks in advance.

    Regards,
    Bassant

    Filter / search nested grids #67635

    Bassant
    Participant

    Oh no, you mean instead of step 2, I can use “applyFilters”, but how should I know the nested grids ??? I only get them one by one in the “initrowdetails”!

    So how can I do it ?

    Thanks in advance.

    Regards,
    Bassant

    Filter / search nested grids #67637

    Peter Stoev
    Keymaster

    Hi Bassant,

    You can get the nested Grid Elements within the initrowdetails. And yes, to apply filters, use applyfilters method.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.