Error : Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive: Rebind.
In one of our project requirement we have customized the SPRADGRID webpart and have created our own webpart. We are facing some issues with Ajax request.
The rad grid is bound to an SharePoint list. and we are calling the ShowEditInsertForm to open the Edit And Add form for the list. when we submit the form. We are trying to refresh the grid through ajax request when the model pop is closed. we get the above mentioned error when the ajax request completes its execution.
below is some part from the code.
Ajax Manager ajax request code
void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind")
{
this.Grid.Rebind();
}
}
JavaScript Code to raise the request
function refreshGrid(arg)
{
if (!arg)
{
ajaxManagerClientId = 'ctl00_RadAjaxManager1';
$find(ajaxManagerClientId).ajaxRequest();
}
else
{
ajaxManagerClientId = 'ctl00_RadAjaxManager1';
$find(ajaxManagerClientId).ajaxRequest();
}
}
In one of our project requirement we have customized the SPRADGRID webpart and have created our own webpart. We are facing some issues with Ajax request.
The rad grid is bound to an SharePoint list. and we are calling the ShowEditInsertForm to open the Edit And Add form for the list. when we submit the form. We are trying to refresh the grid through ajax request when the model pop is closed. we get the above mentioned error when the ajax request completes its execution.
below is some part from the code.
Ajax Manager ajax request code
void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind")
{
this.Grid.Rebind();
}
}
JavaScript Code to raise the request
function refreshGrid(arg)
{
if (!arg)
{
ajaxManagerClientId = 'ctl00_RadAjaxManager1';
$find(ajaxManagerClientId).ajaxRequest();
}
else
{
ajaxManagerClientId = 'ctl00_RadAjaxManager1';
$find(ajaxManagerClientId).ajaxRequest();
}
}