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 / August 2007

Tip: Looking for answers? Try searching our database.

Hiding a grid view?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob Meade - 24 Aug 2007 11:11 GMT
Hi all,

I have a simpler web form where I enable the user to perform a search
against our Index Server.

I am using ASP.Net 2.0 and AJAX.

When the user clicks the button the search is performed a GridView is
populated with data and is displayed to the user on the screen.

I also have a little "progress" indicator which animates whilst it is
searching.  When the user performs a new search and clicks the button again
I want the gridview to disappear, but currently it isn't and I cant work out
why not.

The button is causing an async post back, so I guess thats why it doesn't
completely disappear, but I would have thought by adding grdResults.Visible
= False and upnResults.Update() would have been sufficient, but it simply
doesn't ever disappear.

The GridView is populated with new data if the search is new, if the search
is a search word that was used within the last 5 minutes then the GridView
is populated from the cache.

I have found that if I set the upnResults.Visible = False and then
upnResults.Update() it does disappear, but I have to turn the visibility
back on for the new search results to be displayed and then the GridView
appears momentarily with the old data in it...

Can anyone help me out - its driving me crazy - its only a cosmetic thingy
really for the users benefit but it would look so much better!

Regards

Rob
bruce barker - 24 Aug 2007 16:30 GMT
remember a postback just get new html to render. setting the visibility
on the server while processing has no impact on the currently render html.

you need to hide the grid with javascript at the same time you start the
animation. i'd replace the grid with a loading animation.

-- bruce (sqlwork.com)

> Hi all,
>
[quoted text clipped - 31 lines]
>
> Rob

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.