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: <aspropDownList runat="server" ID="drpAct"></
aspropDownList>
<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).
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: <aspropDownList runat="server" ID="drpAct"></
aspropDownList>
<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).