Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

How do you make gridview controls disappear?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
COHENMARVIN@lycos.com - 29 Apr 2008 21:10 GMT
I have a gridview control that is filled by the user adding rows to it
with a submit button.  Once he is totally through, I want to give him
a 'success' message and then empty the grid.  That should be easy,
because the grid is full of records that are from a database where the
select statement retrieves by using a compare parameter that is a
session variable.  In other words, something like this
Select * from MyTable Where FormID = @FormID
FormID is a session variable.
So simply setting the session variable to something impossible, like
-999, should clear the grids.  But it doesn't.  I tried doing a
gridview.databind statement after the -999, but that did not help
either.
Finally I tried making the gridviews invisible using their 'visible'
property - that also did not work!
Is there some bug here?  Is the page not refreshing?
Can I force a page refresh?
Thanks
Marvin
Nirosh - 29 Apr 2008 21:37 GMT
It seems you have a hard coupled system here.. I don't think -999 will work

Anyway try to wrap the gridview with a div tag (run at server) and hide the
div, when post back, that should work for sure

Signature

L.W.C. Nirosh

>I have a gridview control that is filled by the user adding rows to it
> with a submit button.  Once he is totally through, I want to give him
[quoted text clipped - 14 lines]
> Thanks
> Marvin
Eliyahu Goldin - 30 Apr 2008 10:33 GMT
If you are using declarative databinding with DataSourceID, you need to run
select on the datasource to refresh the grid.

Signature

Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net

>I have a gridview control that is filled by the user adding rows to it
> with a submit button.  Once he is totally through, I want to give him
[quoted text clipped - 14 lines]
> Thanks
> Marvin
Arne Garvander - 30 Apr 2008 15:24 GMT
Take them out to the parking lot and apply some dynamite.
Signature

Arne Garvander
Certified Geek
Professional Data Dude

> I have a gridview control that is filled by the user adding rows to it
> with a submit button.  Once he is totally through, I want to give him
[quoted text clipped - 14 lines]
> Thanks
> Marvin

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.