Refresh Child table data

3 replies. Last post: March 2, 2011 2:52 PM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Larry TanMember

Hi,

I have a hierachical table with child tables. I wanted to refresh my child table but couldn't manage to do so.

I've looked at some of the community posts and tried to refresh my child table via a script

function refreshChild() {    var grid = ISGetObject("WebGrid1");

   grid.Tables["MyChildTable"].Refresh();   // Using DataMember name

}

 

and IN ASP

protected void Button1_Click(object sender, EventArgs e)

{

   WebGrid1.ClientAction.InvokeScript("refreshChild();");

}

 

This doesn't work.

I then tried <

asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" OnClientClick="refreshChild()" />

With the OnClientClick and the refreshChild() function is invoked (i had put alert boxes there to tell me). However the child table still does not refresh. Only until i restart my web server that the child table data (new data) is reflected correctly. Logging out or closing browser doesn't help. I've set HierarchicalMode="LoadOnDemand" but does not make a difference. Would appreciate if someone can point me in the right direction.

 

Best Regards,

Larry

All times are GMT -5. The time now is 9:53 AM.
Previous Next