I am using the RadWindow "Edit Dialog for RadGrid" example and all is going well until the ajax request to rebind the grid - i get the following error:
Sys.WebForms.PageRequestManagerServerException: Object variable or with block variable not set.
I believe the section causing the problem is:
function refreshGrid(arg) {
if (!arg) {
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
else {
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
in the vb pages i have the following code:
Protected
Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
If e.Argument = "Rebind" Then
RadGrid1.Rebind()
ElseIf e.Argument = "RebindAndNavigate" Then
RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount
RadGrid1.Rebind()
End If
End Sub
I have set RadAjaxManager1 to update RadGrid1 in the RadAjaxManager but get the error - does anyone have an idea why this happens? The database is being updated and the grid displays the correct data once the page is refreshed.
Many thanks in advance
Steve :o)