I develope simple application.. In this application output contains two gridview and two buttons.. When i click first button corresponding result show in first gridview.When i click second button result show in second gridview... That time First gridview also display.. I want to show second gridview only......... Anybody know answer reply me....
Thanks...
saravana
Clear the gridview when the page load
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 17, 2010, 11:50 PM EDT
Onclick on 2nd button either set Gridview.Visible=false;
or
GridView1.DataSource=null;
GridView1.DataBind();
and vice versa for button 1
Please mark as answer if it helps.
Hirendra SisodiyaRank #258 · 9.8K reputationPosted Mar 18, 2010, 12:16 AM EDT
gridview1.visible=True;
gridview2.visible=false;
on click event of Button2:
gridview1.visible=False;
gridview2.visible=True;
thanks
SARAVANA PERUMAL12 reputationPosted Mar 18, 2010, 12:38 AM EDT
Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 18, 2010, 1:06 AM EDT
when you get answer of your question from post then please mark the answer from Do you like the answer?
It helps others to find the quick answer.