<
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
<telerik:RadGrid ID="rg_ExportDetail" runat="server" ShowStatusBar="true" OnItemDataBound="rg_ExportDetail_ItemDataBound" OnSelectedIndexChanged="rg_ExportDetail_SelectedIndexChanged"
OnNeedDataSource="rg_ExportDetail_NeedDataSource" OnItemCommand="rg_ExportDetail_ItemCommand" Skin="Vista"
<MasterTableView TableLayout="Auto" EditMode="InPlace" AutoGenerateColumns="false" ClientDataKeyNames="ExportItemID">
<NoRecordsTemplate>
<div>There are no records to display</div>
</NoRecordsTemplate>
<Columns>
<telerik:GridBoundColumn DataField="ExportItemID" UniqueName="ExportItemID" Visible="false" />
<telerik:GridBoundColumn DataField="ExportDate" UniqueName="ExportDate" Visible="true" HeaderText="ExportDate" />
<telerik:GridBoundColumn DataField="Description" UniqueName="Description" Visible="true" HeaderText="Description" HeaderStyle-Width="300px" />
<telerik:GridBoundColumn DataField="ECL" UniqueName="ECL" Visible="false" HeaderText="ECL#" />
<telerik:GridBoundColumn DataField="Quantity" UniqueName="Quantity" Visible="false" HeaderText="Quantity" />
<telerik:GridBoundColumn DataField="UnitValue" UniqueName="UnitValue" Visible="false" HeaderText="Unit Value" DataType="System.Double" DataFormatString="{0:C}"/>
<telerik:GridBoundColumn DataField="TotalValue" UniqueName="TotalValue" Visible="true" HeaderText="Total Value" />
<telerik:GridButtonColumn ButtonType="PushButton" UniqueName="Consignees" text="Add" HeaderText="Consignee(s)" CommandName="AddConsignees" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="120px" />
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ItemStyle-HorizontalAlign="Center" ConfirmText="Removing Item"></telerik:GridButtonColumn>
</Columns>
<ItemStyle HorizontalAlign="Left" CssClass="disabledFontColorEmphasis" Wrap="false" />
<AlternatingItemStyle HorizontalAlign="Left" CssClass="disabledFontColorEmphasis"
Wrap="false" />
<HeaderStyle HorizontalAlign="Left" Wrap="false" Width="100px" />
<FilterItemStyle HorizontalAlign="Left" />
</MasterTableView>
<ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true" >
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
<
script
type
=
"text/javascript"
>
function OnClientClicked_PayInvoice(button, args) {
var argument = button.get_commandArgument();
var arguments = argument.split("#");
var url = 'MakeOrderPayment.aspx?';
url = url + "ID=" + arguments[0];
radopen(url, "radWinInvoiceDetails");
button.set_autoPostBack(false);
}
</
script
>
<
telerik:GridTemplateColumn HeaderText="Action" ColumnEditorID="clmEd150px">
<HeaderStyle Width="20%" />
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<telerik:RadButton ID="rdBtnDoSomeOp" runat="server" ButtonType="StandardButton" Text="Do Some Operation" Skin="Office2010Black" OnClick="rdBtnDoSomeOp_Click">
</telerik:RadButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
protected
void rdBtnDoSomeOp_Click(object sender, EventArgs e)
{
}