Hi Team,
I am using Rad Grid in my project. I want to expand row template on click of row from client side. The code runs fine but when I put ASP .Net Update panel, code stops running after page postback. Below is my code. I am implementing this under DNN site.
Update panel code:
<asp:UpdatePanel ID="updOnlinePaymentHistory" runat="server">
<ContentTemplate>
..........
</ContentTemplate>
</asp:UpdatePanel>
javascript function:
function RowClick(sender, args) {
var item = args.get_item();
var lastState = item.get_expanded();
var Grid = $find("<%= gridPayment.ClientID %>");
var MasterTable = Grid.get_masterTableView();
for (var i = 0; i < MasterTable.get_dataItems().length; i++) {
var row = MasterTable.get_dataItems()[i];
row.set_expanded(false);
}
item.set_expanded(!lastState);
}
HTML defining Rad Grid:
<telerik:RadGrid ID="gridPayment"
AllowPaging="true"
PageSize="24"
runat="server"
AllowSorting="true"
CellSpacing="0"
GridLines="Horizontal"
CssClass="table-responsive"
OnItemDataBound="grdPayment_ItemDataBound"
OnPageIndexChanged="gridPayment_PageIndexChanged"
EnableGroupsExpandAll="false"
RegisterWithScriptManager="False">
<!-- column and template code here -->
<ClientSettings>
<ClientEvents OnRowClick="RowClick" />
</ClientSettings>
</telerik:RadGrid>
When I load page, row expand works fine. but after postback of page, it stops working.
Can you please help me out on this.
Chirag Khunti