Hiding updatepanel, what is the clue?

F

Frank

Hi,

I have read the other post about hiding the updatepanel using the ajax
lifecycle as such at the end of the aspx page:

<script type="text/javascript" language =javascript>

var c = new Sys.UI.Control($get("GridPanel"));

function beginRequestHandler(sender, args)
{
c.set_visible(false);
}

function endRequestHandler(sender, args)
{
c.set_visible(true);
}

function pageLoad()
{

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
}
</script>

This works except for text and my dropdown box, either nothing is
shown (for the text) and the dropdown box is bound irregularly. Code:

<asp:UpdatePanel RenderMode="inline" ID="GridPanel"
updatemode="Conditional" runat="server">
<ContentTemplate >

Activiteit: <asp:DropDownList runat="server" ID="drpAct"></
asp:DropDownList>

<asp:label runat="server" Text="Voorgaande Abo
Facturaties:" ID="histLabel"></asp:label>
<asp:GridView runat="server" ID="grdAbo">
<EmptyDataTemplate>
Deze klant heeft geen abo-geschiedenis.
</EmptyDataTemplate>
</asp:GridView>

</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="drpCust"
EventName="SelectedIndexChanged" />
</Triggers>

</asp:UpdatePanel>

The gridview works fine, except for the 'Activiteit' and dropdownlist.
How come? Is there a better solution to the hiding problem? Using
style's gives me a broken gridview after setting visibility to true
(no values and only some lines).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,039
Messages
2,570,376
Members
47,028
Latest member
IsmaelLans

Latest Threads

Top