Datagrid incremental search

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does any one know how to do an incremental search on the datagrid. By this I mean if i type text in a text box I want the grid to find the record as each letter is typed in. Something like autocomplete in VB. Any suggestions would be helpfull. I know you can use an API to accomplish this in a listbox but that does not work in a grids columns.
 
Try creating a DataView from the data source that the datagrid is bound to.
On the TextChanged event of the TextBox (or an equivilent event), set the
RowFilter property of the DataView to the value entered into the TextBox. As
the RowFilter gets more specific i.e. N; NE; NEW; etc. the datagrid will
display records that are more and more specific to the filter.

HTH,

Paul

Cyberquest said:
Does any one know how to do an incremental search on the datagrid. By
this I mean if i type text in a text box I want the grid to find the record
as each letter is typed in. Something like autocomplete in VB. Any
suggestions would be helpfull. I know you can use an API to accomplish this
in a listbox but that does not work in a grids columns.
 
Back
Top