Home Search Member List Faq Register Login  
UltimatePanel
Re: ShowHideOnClick Example (Postback closes the panel)

Thread Starter: DominoMaximo   Started: 12-04-2008 11:12 AM   Replies: 7
 Karamasoft Support Forums » General Discussions » UltimatePanel » Re: ShowHideOnClick Example (Postback closes the panel)
 Printable Version    « Previous Thread   Next Thread »
  04 Dec 2008, 11:12 AM
DominoMaximo is not online. Last active: 5/7/2009 10:46:01 AM DominoMaximo

Top 10 Posts
Joined on 11-16-2007
Posts 31
 ShowHideOnClick Example (Postback closes the panel)
Any ideas on how to keep the panel to stay open on a postback?

Description

Using the SHowHideOnClick Example
http://www.karamasoft.com/Samples.aspx?component=UltimatePanel

When I open up the panel and it is displayed I am selecting an item from a gridview inside the upSH panel.  The gridview does a postback to get the data I need in my main area then closes the upSH panel.

Is it possible to keep the UltimatePanel id="upSH" to stay visible after a postback?

  
  04 Dec 2008, 11:50 AM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: ShowHideOnClick Example (Postback closes the panel)
This post might help answering your question: http://forums.karamasoft.com/ShowPost.aspx?PostID=1244
  
  05 Dec 2008, 7:00 AM
DominoMaximo is not online. Last active: 5/7/2009 10:46:01 AM DominoMaximo

Top 10 Posts
Joined on 11-16-2007
Posts 31
Re: ShowHideOnClick Example (Postback closes the panel)
 Karamasoft wrote:
This post might help answering your question: http://forums.karamasoft.com/ShowPost.aspx?PostID=1244


I spent quite some time with it and this is not going the right direction.

Putting the OnLoad="OajMxac7('upSH')" in the body like the example stated loaded the panel when the page loads, however when doing a postback the panel closes.  I initially thought it would have stayed open considering it is in the onLoad event in the body.  So I think this was a great thought, but it did not work.  Ideally I would like to have the panel initially closed then if I open it and I'm doing a postback keep the panel open.  I could settle for the panel to be open initially, however the key is keeping the panel open on the post back and the example posted did not work. 

  
  05 Dec 2008, 11:25 AM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: ShowHideOnClick Example (Postback closes the panel)
Are you doing a regular page postback or an AJAX postback? If the panel is shown the page is loaded, it should be shown after the postback, too. In fact, we just tested this in our ShowHideOnClick sample by adding the OnLoad="OajMxac7('upSH')" to the BODY element as follows:

<body OnLoad="OajMxac7('upSH')">

Then, we added a button to the page to do the postback. We opened the page, the panel was shown, then we clicked on the button and submitted the page and the panel was shown again.

  
  05 Dec 2008, 11:47 AM
DominoMaximo is not online. Last active: 5/7/2009 10:46:01 AM DominoMaximo

Top 10 Posts
Joined on 11-16-2007
Posts 31
Re: ShowHideOnClick Example (Postback closes the panel)
Are you doing a regular page postback or an AJAX postback?

That could be the difference I have an update panel wrapped around the "upSH" ultimate panel.

For example:

<aspStick out tongueanel
ID="MyPanel"
runat="server">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                        <cc1:UltimatePanel id="upSH" runat="server" ....>
                                  The event that is doing a post back is in here.
                        </cc1:UltimatePanel>
                </ContentTemplate>
        </asp:UpdatePanel>
</aspStick out tongueanel>

I will try and not wrap that portion in the update panel which is essentially an AJAX postback.  I'll let you know if it works.



  
  05 Dec 2008, 11:55 AM
DominoMaximo is not online. Last active: 5/7/2009 10:46:01 AM DominoMaximo

Top 10 Posts
Joined on 11-16-2007
Posts 31
Re: ShowHideOnClick Example (Postback closes the panel)
The type of postback was indeed the difference.  I didn't wrap the UltimatePanel in the AJAX updatePanel control and it worked!  Thank you once again!

  
  05 Dec 2008, 12:49 PM
DominoMaximo is not online. Last active: 5/7/2009 10:46:01 AM DominoMaximo

Top 10 Posts
Joined on 11-16-2007
Posts 31
Re: ShowHideOnClick Example (Postback closes the panel)
Is there any way I can do this on a click event (code behind)?  I would initially like the panel to be closed to the user on page load.  On the click event I want to keep the ultimatepanel open.  The above solution would work if I always wanted to display the panel on page load.

  
  05 Dec 2008, 2:32 PM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: ShowHideOnClick Example (Postback closes the panel)
You can try removing the body onload event handler and calling the following in onclick event handler: OajMxac7('upSH')
  
 Page 1 of 1 (8 items)
Karamasoft Support Forums » General Discussions » UltimatePanel » Re: ShowHideOnClick Example (Postback closes the panel)

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.