How to create a DataView by a specified row(s)?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How to create a DataView by a specified row or rows?

That is to say, when a row( or rows) are specified, is it possible to
create a DataView which just includes this row (rows)?

If not possible, is it possible to create a DataView, which only includes
the parent row, by a specified row and the parent relation name?

As you know, in ADO.net, there is DataRowView method as the following:

public DataView CreateChildView(DataRelation);


Due to I have to bind a DataView to a DataGrid, so I have to solve this
problem.

Please help me.

Thank you in advance.

Ying LI
 
Hi Ying,

Ying LI said:
How to create a DataView by a specified row or rows?

That is to say, when a row( or rows) are specified, is it possible to
create a DataView which just includes this row (rows)?

Yes, you will have to create correct filter expression that selects only
this row (rows).
Perhaps using IN keyword.
If not possible, is it possible to create a DataView, which only includes
the parent row, by a specified row and the parent relation name?

If you cratea appropriate filter.
 
Back
Top