Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
igGrid search functionality
posted

Hello,

Trying to implement search functionality in igGrid table. It is column based search(i.e horizontal search) with capability to search 'next' and 'prev' search 'text' in grid table.

I have attached sample code which loads 20,000 rows in igGrid table.

Currently implemented code is based on jquery code which searches up till 73 records.

$("#rowSelectionGrid").closest("table").find("tr td:nth-child(" + (parseInt(val[index])+1) + ")");

trying to find what is equivalent to above code to get all cells in selected columns in igGrid. Trying to implement code which reached all 20,000 rows in igGrid table.

Please help me in finding a solution for this.

Thanks

S M

igGridSearch.zip
Parents
No Data
Reply
  • 3995
    Offline posted

    Hello S M,

    There is no way to get all of the cells, when using virtualization, because only a small chunk of them is rendered in the DOM.

    To achieve filtering, you can reach out to the records from the dataSource and filter by their values.

    Once you've got the index of the record, there is a way to scroll to it - http://help.infragistics.com/jQuery/2015.2/ui.iggrid#methods:virtualScrollTo

    And after the scrolling the row is going to be rendered into the DOM. Once this is done you can get it and apply styles to it.

    Also note that this behavior seems very close to the selection feature, please refer to the methods of that feature.

    http://help.infragistics.com/jQuery/2015.2/ui.iggridselection#methods:selectCell

    You can select virtual rows/cells with Selection API and you don't have to scroll to the desired row.

Children