By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,679 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,679 IT Pros & Developers. It's quick & easy.

Doubling up of data in DataView-bound DataGrid??

P: n/a
Before I go through posting a lot of code, a quick question ... Has
anyone come across a problem with a DataView showing duplicates of the
desired data? I'm querying a SQL table and the DataView (or grid) keeps
adding the same subset of data each time I refresh the view.

Thanks in advance!

Sep 19 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Nate,

If you do a Fill and not clear the dataset or the table in advance, than
those will be filled again.

The dataview is only showing things that are in a datatable.

I hope this gives an idea,

Cor

"Nate" <ho**************@gmail.comschreef in bericht
news:11**********************@m73g2000cwd.googlegr oups.com...
Before I go through posting a lot of code, a quick question ... Has
anyone come across a problem with a DataView showing duplicates of the
desired data? I'm querying a SQL table and the DataView (or grid) keeps
adding the same subset of data each time I refresh the view.

Thanks in advance!

Sep 19 '06 #2

P: n/a
Cor,

Thanks for your reply. I checked the table that the View is bound to
(using DV = DT.DefaultView) while running the app, and it has only one
copy of the data that shows up in duplicate. Also, if I clear either
the DataSet or Table, nothing shows up in the View at all (although all
the data is in the Table at the time).

So I'm thinking it's something in my RowFilter... although, how would
*that* show two copies of the rows? I even set it to the empty string
before setting the filter.

Nate

Sep 25 '06 #3

P: n/a
Try putting this line of code first in the sub where you load the
table.

If Dataset.Tables.Contains("TableName") Then
Dataset.Tables("TableName").Clear()

Hope this helps,
Izzy
Nate wrote:
Cor,

Thanks for your reply. I checked the table that the View is bound to
(using DV = DT.DefaultView) while running the app, and it has only one
copy of the data that shows up in duplicate. Also, if I clear either
the DataSet or Table, nothing shows up in the View at all (although all
the data is in the Table at the time).

So I'm thinking it's something in my RowFilter... although, how would
*that* show two copies of the rows? I even set it to the empty string
before setting the filter.

Nate
Sep 25 '06 #4

P: n/a
Thank you both.... clearing the Table cleared things up!

The trick was figuring out where to put the Clear(); do to the UI
having a few TabPages (and the Clear needing to go into a specific
TabPage Click but not others), it got a bit tricky.

Nate

Sep 25 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.