|
-
Mar 17th, 2011, 02:47 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] The Update Panel, the Collapsible Panel and the Table
HI guys,
What I want to do is have a page load with a table with no data loaded. Then when the user clicks a button I want to just update the panel where the table is. So only that table data gets called. After the data is in the table I want the user to be able to control the collapsible panel that the table is in so that the user doesn't always have to look at it.
I also have a update progress panel because loading the data takes some time.
So basically first time call the server, after that don't call the server.
-
Mar 17th, 2011, 07:36 AM
#2
Re: The Update Panel, the Collapsible Panel and the Table
Hello,
Based on the terms that you have used within your post, am I correct in saying that you are looking into doing this using the AJAX Control Toolkit?
Gary
-
Mar 17th, 2011, 09:29 AM
#3
Thread Starter
Hyperactive Member
Re: The Update Panel, the Collapsible Panel and the Table
Correct. Basically all I'm looking for is a way to have a table that will get updated when the user pushes the button to update that particular table (update panel idea). I don't want the whole page to get refreshed just that one section. After the user has updated the table then have the user just to make the table visible and non visible by clicking a button (collapsible panel idea), it shouldn't call the server again. Data in the table will remain the same after the first call to server.
Now I really don't care if it calls the server again, but if it does then I really don't want the user to know that it called the server. However, on the first call to the server to load the table it will take a considerable amount of time for the program to load the data into the table so the user will get an update progress busy icon. But after the first call to the server to load the data into the table they should never see the update progress icon again since the data is already loaded.
What I tried was I put a table within a collapsible panel, which was in an update panel. Put a button on the outside of all this and set the trigger for the update panel to the button. Next what I did was I set the SuppressPostBack="false" for the collapsible panel. Then I took another collapsible panel and stuck the update progress control in that. I then made the open and close control to the same button as the update panel button so that both collapsible panels will be open at the same time.
This works. It does keep calling the server and updating the table each time the user pushes the button which is fine. However, the problem is that if you click the button fast enough like just open and then immediate close and immediatly open again the table data is still there, but the update progress is running because it's calling the server and loading the data. If you open, close then wait about 15 seconds then it will open the collapsible panels then data for the table won't be there and you'll see the update progress control which is one of the ways I want it.
Either no table and update progress control, or table and no update progress control.
Another idea I had was during the first load of data into the table. Save the table to the session state. So when the user reopens the table check to see if the table is in the session state if so load from there. This would make it so that the table gets loaded practically instantaneous. However, I really don't like this approach because I already have my data loaded into the table. I just don't want to call the server back after the first call.
Last edited by jakkjakk; Mar 17th, 2011 at 09:35 AM.
-
Mar 17th, 2011, 06:32 PM
#4
Re: The Update Panel, the Collapsible Panel and the Table
There is the standard update mode in updatepanel and conditional that will do an update - postback,sort of on the panel.
Also read this:
http://msdn.microsoft.com/en-us/libr...=VS.90%29.aspx
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 18th, 2011, 02:21 AM
#5
Thread Starter
Hyperactive Member
Re: The Update Panel, the Collapsible Panel and the Table
Thanks I ended up putting my table into the session state and that works really well. thanks for the help.
-
Mar 18th, 2011, 02:35 AM
#6
Re: [RESOLVED] The Update Panel, the Collapsible Panel and the Table
Hello,
The only thing to be careful about here is the size of the information that you are putting into Session. As the number of users you have increases, so will the amount of the RAM that you need.
Gary
-
Mar 18th, 2011, 10:41 AM
#7
Thread Starter
Hyperactive Member
Re: [RESOLVED] The Update Panel, the Collapsible Panel and the Table
I didn't think of that. I could put it in the viewstate instead. Thats what I'll do if I run into memory issues.
-
Mar 19th, 2011, 09:05 AM
#8
Re: [RESOLVED] The Update Panel, the Collapsible Panel and the Table
Hello,
The only thing to be careful with here though is that would be information for the current page only, that information would not be able on any other pages.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|