473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Hiding a grid view?

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
Aug 24 '07 #1
1 1180
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)

Rob Meade wrote:
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

Aug 24 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: pmud | last post by:
Hi, I need to display columns in a data grid based on 7 different queries. Now I have 32 questions: 1. Is it possble to have 1 single data adapter with 7 queries & 1 data set or do I need to...
12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
0
by: ¿ Mahesh Kumar | last post by:
I have created a XML file as datasource which i 'm binding to a grid view control. During runtime I'm capturing items in XML file and displaying in a GRID VIEW control. but i want to remove or...
5
by: srinivas | last post by:
Hi, I have binded a dataset to a gridview control at run time. I'm fetching 5 columns from the database. But while displaying it on the screen i want to show only 3 columns. I tried with...
2
by: Umeshnath | last post by:
Hi, I have placed a grid view inside Atlas panel. On click of a button event, data is populated in the grid view, I want to add scroll bar instead of increasing the size of grid view. I have...
4
by: JPabich | last post by:
I am new at the html side, but I what I have is a serious of DataViews on my screen. When you click a link, it needs to show the appropriate dataView and hide all the others. How do I hide these...
2
by: subramanian100in | last post by:
Is my following understanding correct ? Data abstraction means providing the interface - that is, the set of functions that can be called by the user of a class. Information hiding means...
4
LoanB
by: LoanB | last post by:
Hi gang, Im busy writing my firs Windows Mobile 6 Application. - I'm a beginner ok. My first problem: When I run the app through the emulator I get an error: Database file cannot be found. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.