Can you provide a javascript example for refreshing/reloading the grid client-side?
I want to migrate the following UltraWebGrid js code: grid.invokeXmlHttpRequest(grid.eReqType.Refresh);
Hi,
The WebDataGrid does not have such a client-side method. The best approach would be to wrap it inside of the UpdatePanel and do a refresh on that.
http://weblogs.asp.net/jeffreyzhao/archive/2008/04/26/refresh-the-updatepanel-using-javascript-code.aspx
-Taz
I have tried your solution. However it doen't work in my application, because I use the grid inside a websplitter pane. The grid is not displayed in IE8 nor in Google Chrome on startup. The grid shows in IE7 compatibility mode.
Below you find the aspx of my test page:
< body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> </div> <ig:websplitter id="cSplitter" runat="server" enableviewstate="false" SkinId="Vertical" Width="100%" Height="100%"> <Panes> <ig:SplitterPane runat="server"> <Template> <asp:UpdatePanel ID="gridPanel" runat="server"> <ContentTemplate> <ig:WebDataGrid ID="mainGrid" runat="server" EnableAppStyling="False" EnableViewState="False" /> </ContentTemplate> </asp:UpdatePanel> </Template> </ig:SplitterPane> <ig:SplitterPane runat="server" CollapsedDirection="NextPane" Size="200px" ContentUrl="about:blank" FrameBorder="False" /> </Panes> </ig:websplitter> </form></ body>
<
body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
</div>
<ig:websplitter id="cSplitter" runat="server" enableviewstate="false" SkinId="Vertical" Width="100%" Height="100%">
<Panes>
<ig:SplitterPane runat="server">
<Template>
<asp:UpdatePanel ID="gridPanel" runat="server">
<ContentTemplate>
<ig:WebDataGrid ID="mainGrid" runat="server" EnableAppStyling="False" EnableViewState="False" />
</ContentTemplate>
</asp:UpdatePanel>
</Template>
</ig:SplitterPane>
<ig:SplitterPane runat="server" CollapsedDirection="NextPane" Size="200px" ContentUrl="about:blank" FrameBorder="False" />
</Panes>
</ig:websplitter>
</form>
</
Thanks for your suggestion.
I was hoping for a different kind of way to trigger a refresh. Under water the virtual scrolling or the sorting behaviour should be able to perform a refresh.
Roland