DataView vs. DataGridView

E

ewingate

What is the real difference between the DataView and the DataGridView?
Is the DataView even a control or is it merely a class? With methods
that allow you to edit rows and columns it seems like it would be a
control that you could drag and drop on a form in the designer but I
cannot find the DataView control in the toolbox. I have used a
DataGridView before but I was wondering if DataView has better
functionality.


Thanks!

-E
 
N

Nicholas Paldino [.NET/C# MVP]

DataView is not a control. It is a type that is used to perform
filtering on a DataTable without actually changing the data in the data
table. This way, you can separate the data from the presentation of the
data (in this case, presentation meaning a view on the data, where it is
sorted, or filtered).

The DataGridView is a control that allows you to view tabular data, from
a DataTable, or other sources.

It just so happens that the naming is similar.
 
E

ewingate

Ahh, excellent. Thank you for the answer. That was precisely the
information that I needed.


-E




DataView is not a control. It is a type that is used to perform
filtering on a DataTable without actually changing the data in the data
table. This way, you can separate the data from the presentation of the
data (in this case, presentation meaning a view on the data, where it is
sorted, or filtered).

The DataGridView is a control that allows you to view tabular data, from
a DataTable, or other sources.

It just so happens that the naming is similar.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




What is the real difference between the DataView and the DataGridView?
Is the DataView even a control or is it merely a class? With methods
that allow you to edit rows and columns it seems like it would be a
control that you could drag and drop on a form in the designer but I
cannot find the DataView control in the toolbox. I have used a
DataGridView before but I was wondering if DataView has better
functionality.

-E- Hide quoted text -

- Show quoted text -
 

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