"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:iU****************@TK2MSFTNGXA02.phx.gbl...
Hi Peter,
Are you using a DataView as the data source of the DataGridView? If so, we
cannot make it visible unless the row meets the criteria of the filter.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
I do have a criteria filter which does find the desiried row, but the row
never becomes visible in the grid if it's not visible when the search
started. How do I make the row visible in the DataGridView after I find the
row in the DataView?
System.Data.DataView dvOpenOrders;
.....
.....
this.dvOrders.Table = dt.GetOrders();
this.dataGridView1.DataSource = this.dvOpenOrders.Table;
this.dvOrders.Sort = "id";
object[] findKey = new object[1];
DataColumn[] dcolPk = new DataColumn[1];
dcolPk[0] = tbl.Columns["id"];
tbl.PrimaryKey = dcolPk;
tbl.DefaultView.Sort = "id";
findKey[0] = id;
row = tbl.DefaultView.Find(findKey);