Can a DataView be used without binding it to a DataSource

T

Top Gun

Can a DataView be used directly without binding it to another control, such
as a DataGrid. I would like to use RowFilter on a DataSet table and extract
values from specific columns in rows returned by the filter.

Is this possible?
 
W

William Ryan eMVP

Top Gun said:
Can a DataView be used directly without binding it to another control, such
as a DataGrid. I would like to use RowFilter on a DataSet table and extract
values from specific columns in rows returned by the filter.

Is this possible?

Yes, A dataview, dataset and datatable exist totally independent of any
control. The fact that you can bind controls to them have to do with the
fact that they implement IList, butjust b/c you can bind them doesn't mean
there's any necessity to do so.
 
R

Richard

Yes,

DataView dv = {whatever to create view...}

dv.Count --> returns num rows in view.
dv[0] --> returns a view to row 0
dv[0][1] --> returns column 1 in row 0

--Richard
 

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