typed/custom dataview

  • Thread starter Thread starter Sankar Nemani
  • Start date Start date
S

Sankar Nemani

Hi all,
I am able to find examples/documentation on typed datasets (which
consist of typed datatables). But once I want to use dataviews of the tables
I am stuck with the regulare DataView which is not typed(or custom).
Does anyone have an example/documentation on how to effectively do this?
TIA
Sankar Nemani
 
Hi Sankar,

Yup, DataViews are never typed, IOW there is no design time support for such
a beast.
You might derive a class from DataView and add strong typed properties by
yourself, though.
 
Thanks for Miha's quick response.

Hi Sankar,

Thank you for posting in the community!

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to create typed DataViews in
your app. If there is any misunderstanding, please feel free to let me know.

Just as Miha said, DataViews are never typed. As DataSets and DataTables
are data structures which data are actually saved in them. However,
DataView is used to represent a databindable, customized view of a
DataTable for sorting, filtering, searching, editing, and navigation. They
just provide different ways for viewing a DataTable. Editing the data from
a DataView actually edits the data in the source DataTable. So if the
source DataTable is typed, the DataView created from that DataTable is also
typed.

For more information about the DataView class, please check the following
link for reference:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemDataDataViewClassTopic.asp

Does this answer your question? If anything is unclear, please feel free to
reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top