Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by shrishti on Apr 28, 2008 01:55
open dhtmlx forum
text search, master checkbox

i want to implement text search in the plain grid. i went through the documentation to find how to perform search in the grid. i couldnt get any info. i know it can be performed using attach header...but not sure how to use it.. pls help with the syntax.

similarly how to use master_checkbox type?

Answer posted by Support on Apr 28, 2008 03:13
If you need a custom search you can use any custom API and just call
    grid.findCell(....
with necessary params.

To create a ready to use search box inside header you just need to add #text_search as column label

    grid.setHeader("A,#text_search,C")
or
    grid.attachHeader("A,#text_search,C")
Answer posted by shrishti on Apr 28, 2008 04:08
thanks.. but based on watever given in the search box, can the data be loaded again? if so, wat javascript has to called??
would the search box be considered as a sub-grid?

Answer posted by Support on Apr 28, 2008 06:06
The "search box" just select row which match entered criteria.
If you need to show only subset of rows based on search criteria you may use
    grid.filterBy(...
api, or in case of ready to use solutions
    grid.setHeader("A,#text_filter,C")
or
    grid.attachHeader("A,#text_filter,C")