search in datagrid

hamid

Centurion
Joined
Jul 13, 2004
Messages
114
how can search string in specific column of datagrid (all records) ?
i have a datagrid and a textbox, when user change textbox content i want search it in datagrid (specific column) and direct user to it row.
but i dont know how can i search in column?
thanks
 
try (Gives you the current selection)

intR = DataGrid1.CurrentRowIndex
intC = DataGrid1.CurrentCell.ColumnNumber

DataGrid1.Item(intR, intC) will give you the value in the Cell.

Then you can use a loop, and go from the start of a column to the end of a column putting in you own values for column, to meet your needs.
 
Back
Top