Click here to Skip to main content
12,949,083 members (56,422 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have a web form on that while selecting, System Name from drop down list all install hardware name displayed in gridview1, now i using dropdownlist2 after selecting from dropdownlist2 and while adding ADD button selected hardware list displaying in GridView2, i can Add multiple rows in gridview2. Now while pressing save button all the GridView2 records Saved in database displaying in gridview1. Now I want Save gridview2 in database and display in gridview1 while pressing Save button, All the rows of GridView2 should get clear.

Please help me to find out the solution, better if i will get the code.
Thanks in Advance
Posted 7-Apr-12 2:22am
Namit KB1.3K
Updated 7-Apr-12 2:25am
Nilesh Patil Kolhapur 7-Apr-12 8:26am
failed to understand ur question clarify more

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you want to clear a GridView you remove the datasource

GridView.DataSource = null;

Extremely easy for one who done more complicated operations with dropdowns and grids. Did you?
rishimuni 10-Sep-13 2:45am
rishimuni 10-Sep-13 2:45am
Add both
GridView.DataSource = null;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,489
CHill60 3,330
Maciej Los 2,913
Jochen Arndt 1,935
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web01 | 2.8.170524.1 | Last Updated 7 Apr 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100