I am using 2 Stored Procedures to populate 2 different RadGrids. For RadGrid1, OnNeedDataSource event calls a handler function inside which a SP is executed and the data table is equated to RadGrid1.DataSource. Now, I want to populate RadGrid2 when a row is selected in RadGrid1. For this, OnRowSelected event of RadGrid1 is handled by a Javascript function that is extracting some specific cell values of the selected row and initiates an ajaxRequest() with argument string passed. I am using a RadAjaxManager which looks like :
<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_OnAjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
In Code-Behind, I have a handler function RadAjaxManager1_OnAjaxRequest() for handling the ajax request. Inside RadAjaxManager1_OnAjaxRequest, I am passing on the arguments to execute an SP and equating the data table returned to RadGrid2.DataSource, as below :
protected
void RadAjaxManager1_OnAjaxRequest(object sender, AjaxRequestEventArgs e)
{
String argument = e.Argument;
String[] args = argument.Split("^".ToCharArray());
NameValueCollection parameters = new NameValueCollection();
parameters.Add("@par1", args[0]);
parameters.Add("@par2", args[1]);
parameters.Add("@par3", args[2]);
RadGrid2.DataSource = obj.ExecuteSP("MySP", parameters);
RadGrid2.Rebind();
}
The problem arises now, when I select a row in RadGrid1, I do not see any RadAjaxLoadingPanel being loaded. Moreover, the RadGrid2 does not populate. However, While debugging I am able to see that the rows are being returned(RadGrid2.DataSource.Rows.Count is greater than 0).
Thanks,
Anup