This is a migrated thread and some comments may be shown as answers.

[Solved] Problem refreshing grid on window close

1 Answer 170 Views
Window
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 14 May 2008, 07:07 PM

I'm trying to convert my ASP.Net windows to AJAX windows, and running into an AJAX problem. The base page (the one that opens the Window) has a Grid that I want to refresh when the window is closed. Previously, it was using the refreshGrid(arg) that seems to be popular, but I'm trying to convert it to an AJAX call using the OnClientClose event.

My Javascript function looks like this:

function OnClientClose(sender, eventArgs)
{
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}

And the server-side event looks like:

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
  if (e.Argument == "Rebind")
  {
    RadGrid2.Rebind();
  }
}

I can see the server-side event firing in debug mode, but the grid never updates and I get a Javascript error "Object doesn't support this property or method". What am I doing wrong?

Bill

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 15 May 2008, 02:13 PM
Hi Bill,

Make sure that the RadAjaxManager is set up properly - it must be set to initiate ajax requests and to update the RadGrid.

If you still experience problems, please open a support ticket and send us a small sample project where the problem can be reproduced. We will check it and get back to you with solution right away.



Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
Matt
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or