DataGrid传值定位选中行
string InputStr = strVipID;
foreach (DataGridViewRow dvr in dbgVip.Rows)
{
if (dvr.Cells[0].Value.ToString().StartsWith(InputStr))
{
dbgVip.ClearSelection();
dvr.Selected = true;
break;
}
}
foreach (DataGridViewRow dvr in dbgVip.Rows)
{
if (dvr.Cells[0].Value.ToString().StartsWith(InputStr))
{
dbgVip.ClearSelection();
dvr.Selected = true;
break;
}
}