I have a grid bound to a database. I want the user to be able to make incremental search.(User will enter some letters in text box and the string starting with the same should be highlighted) I am using the function Instr (of VB.NET):
for each Row in Mydatagrid.Rows
If Instr(str1,str2,comparemethod.text) > 0 then
currentrow = activerow
The problem is that if I want to search for strings starting with 'r' and in the rows there is a person containing the name like Bear, then this name is highlighted first instead of the one starting with R. How should I program this so that the string STARTING with the first few characters of the text box is displayed.