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

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
 
M

Miha Markic [MVP C#]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top