由网友(掐指一算、你俩准散)分享简介:我怎样才能选择一个特定范围内的行的DataGridView 编程方式在运行时?How can I select a particular range of rows in a DataGridView programmatically at runtime?推荐答案没测试过,但我认为你可以做到以下几点:Not...
我怎样才能选择一个特定范围内的行的DataGridView
编程方式在运行时?
How can I select a particular range of rows in a DataGridView
programmatically at runtime?
推荐答案
没测试过,但我认为你可以做到以下几点:
Not tested, but I think you can do the following:
dataGrid.Rows[index].Selected = true;
或者你可以做以下(但agian:未测试):
or you could do the following (but agian: not tested):
dataGrid.SelectedRows.Clear();
foreach(DataGridViewRow row in dataGrid.Rows)
{
if(YOUR CONDITION)
row.Selected = true;
}
相关推荐
最新文章