c#, web forms, vs2003
i have this data grid view that im trying to create a shopping cart.
my problem is when i data bind to each and every time if ther is previous binding that values still there how do i only bind the new value and display only new value in a data grid .
kalpa23
0
Light Poster
Recommended Answers
Jump to PostJust a quick note... nothing against your requests but...
1) please phrase your post titles to give some idea of the question contained
2) please please PLEASE stop adding a line of periods at the end of every single post title you create :)Having two identically titled …
Jump to PostNo worries :) Just pointing it out for future reference.
Jump to PostI believe what he's getting at is for you to put your own datagridview's name where his sample has dataGridView1.
As such:
if (this.dgresults.DataSource != null) { this.dgresults.DataSource = null; } else { this.dgresults.Rows.Clear(); }
Jump to PostSo there's no dgresults.Items.Clear()?
Hmm... I was hoping not to have to open my VS for this one LoL give me a few min.
Jump to PostOh ho.... dataGrid, not dataGridView...
That's why the suggestions given above don't work (Rows.Clear()) because it's a dataGrid and not a dataGridView so they have different properties.
You might have some success with .Items.Clear()... might not, doing some research on it for you at the moment.
All 17 Replies
hirenpatel53
-1
Posting Whiz in Training
kalpa23
0
Light Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
kalpa23
0
Light Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
hirenpatel53
-1
Posting Whiz in Training
kalpa23
0
Light Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
kalpa23
0
Light Poster
kalpa23
0
Light Poster
kalpa23
0
Light Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
kalpa23
0
Light Poster
kalpa23
0
Light Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.