I want to refresh the data the grid is displaying. Does the grid provide a client side function to refresh itself using AJAX?
Hello,
I am going through the help file for CSOM (client-side object model) for WebDataGrid and unfortunately am not able to find a client-side method for that.
Still, in most cases if we assume that you have wrapped your WebDataGrid inside an UpdatePanel, you can just have a button inside the ContentTemplate of the update panel (let's have its ID="RefreshButton") - then you can refresh the whole UpdatePanel with
<script type="text/javascript">function RunThisAfterAsyncPostback(){ document.getElementById("<%= RefreshButton.ClientID %>").click();}</script>
you can hide the button by setting its style / CssClass to have negative top / left properties ot display:none / visibility: hidden
What is firing the RunThisAfterAsyncPostback() call? I've tried to run the example code but javascript is not firing.
you can do the post back for example on the SelectionChanged Event of a WebDropdown.
function cboAAA_SelectionChanged(sender, eventArgs) {
document.getElementById("<%= cmdDoRefresh.ClientID %>").click();
}
------------
update panel and trigger
------------------------
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="cmdDoRefresh" runat="server" Text="Refresh" />
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="977px" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" DataKeyFields="MainKey">
******here the bound columns ******
</ig:WebDataGrid>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="cmdDoRefresh" EventName="click" />
</Triggers>
</asp:UpdatePanel>
This really helped. Thanks a lot :)
Glad it helped.
Hi Fesani,
Please refer
http://www.infragistics.com/community/forums/p/38704/461827.aspx#461827.
I dint see response. Would you kindly take this up and provide a sample on what Angel Todorov has suggested and reply me asap.
Its blocker issue for us and highly in need of help from IG team.