Well, in this case you have a couple of choices, since your filter doesn't
appear to
provide what you need:
1) sort the rows in some meaningful way so that whatever "Distinct" you need
shows up in consecutive rows, and iterate over the rows comparing each to the
previous one, throwing out any duplicates and possibly using them to populate
a new DataSet / DataView.
2) do this on the server where your SQL query pre-insures that you get what
you need.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Li Pang" wrote:
Peter,
Thanks for your response. But this solution doesn't resolve my problem.
My situation is:
I have a datatable of many rows and I create a dataview by filtering data.
The dataview has somehow multiple identical rows. My question is how to get a
dataview contains ONLY DISTINCT data.
"Peter Bromberg [C# MVP]" wrote:
DataView dv = myDataTable.DefaultView;
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Li Pang" wrote:
Hi,
I want to know how to create a dataview from a datatable of DISTINCT data.
Thank in advance