I have application which contain textbox, 2 button and datagridview
In text box user will enter query
button1 click to display query result in gridview and Button2 to export data to excel
My application is working fine
But problem is when i again click button1 it also show the previous data with new one
But i dont want when user click button1 2nd time the prevoius data to be present
Arjun_Sarankulu
-3
Junior Poster
Recommended Answers
Jump to PostShow us your code work please.
Jump to PostDo mean that when you execute your query the datagridview should refresh the data!!
If So, Here it is.If you use dataadapter to fill gridview use,
dataGridView1.DataSource = null;
If you manually fill the gridview Use,
dataGridView1.Columns.Clear();
All 5 Replies
kvprajapati
1,826
Posting Genius
Team Colleague
samueal
0
Junior Poster
Arjun_Sarankulu
-3
Junior Poster
Arjun_Sarankulu
-3
Junior Poster
Mitja Bonca
557
Nearly a Posting Maven
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.