Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
i want to populate and show the grid view on aspx page only after button click.
plz help .
Posted 21-Jan-13 20:32pm
Nandakishorerao at 22-Jan-13 2:40am
what have you done till now? ..paste it
rizwan muhammed khan gouri at 22-Jan-13 8:44am
what you want?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

while loading time put the visibility of gridview to false and while button click,enable it.
heart rocker at 22-Jan-13 2:02am
how exactly can i do that
josh-jw at 22-Jan-13 2:07am
in page_load event write
Gridview1.visible = false;
in button clcik event
Gridview1.visible = true;
heart rocker at 22-Jan-13 3:26am
thnx a lot
josh-jw at 22-Jan-13 3:31am
welcome.if you feel this solution helps you,please mark it as answer.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

At the Page_Load event invisible the gridview and at the Button_Click event populate the data and visible the gridview.
Lets say the page name where you want to show the GridView is ShowData.aspx
Then in the Page_Load event of ShowData.aspx page invisible the gridview as
Then in the Button_Click event Retrive the data for GridView and make visible property "true" as
heart rocker at 22-Jan-13 2:02am
How exactly Can I do that??
Ankit Mishra at 28-Oct-13 10:17am
shabari7 at 22-Jan-13 2:18am
don't include the gridview method in page load, just do in button click

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

  Print Answers RSS
0 Peter Leow 295
1 Mika Wendelius 275
2 CHill60 190
3 TheRealSteveJudge 190
4 Rob Philpott 130
0 Sergey Alexandrovich Kryukov 8,613
1 OriginalGriff 6,581
2 Peter Leow 3,962
3 Zoltán Zörgő 3,480
4 Richard MacCutchan 2,502

Advertise | Privacy | Mobile
Web01 | 2.8.150123.1 | Last Updated 22 Jan 2013
Copyright © CodeProject, 1999-2015
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