With datasoure entered in gridview, I want to focus the row that corresponds to the value by sending the value to the function.
ex)GridView
Column1 Column2
Row1 a1 a2 >> now Focus
Row2 b1 b2
I want to focus on Row2 when I enter b1 in >> function.
private void FocusedRow(string Value){
for(int i =0; i< grid.RowCount; i ++){
if(grid.Rows[i].Cells[0].Value.ToString() == Value){
grid.ClearSelection();
grid.Rows[i].isSelected = true;
}
}
}
>>Current function I created.
ex)GridView
Column1 Column2
Row1 a1 a2 >> now Focus
Row2 b1 b2
I want to focus on Row2 when I enter b1 in >> function.
private void FocusedRow(string Value){
for(int i =0; i< grid.RowCount; i ++){
if(grid.Rows[i].Cells[0].Value.ToString() == Value){
grid.ClearSelection();
grid.Rows[i].isSelected = true;
}
}
}
>>Current function I created.