文章引自:
http://www.cnblogs.com/spgoal/archive/2006/09/04/494665.html

代码如下:

 string InputStr = tbKey.Text; 
            
foreach (DataGridViewRow dvr in dataGridView1 .Rows)
            {
                
if (dvr.Cells[0].Value.ToString().StartsWith(InputStr))
                {
                    dataGridView1.ClearSelection();
                    dvr.Selected 
= true;
                    dataGridView1.CurrentCell 
= dvr.Cells[1];
                    
break;
                }
            }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-04-24
  • 2021-04-25
  • 2021-12-07
猜你喜欢
  • 2021-08-09
  • 2021-05-12
  • 2022-02-22
  • 2021-11-04
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案