Hey Guys
I am using RadTreeList and doing the hierarchical binding of data by keeping that in the update panel and doing server side binding using AjaxManager and keep the paging enabled.
Whenever I click on any page number or Group(-) Image on the top left of the tree list it throws java script error and treelist got crashed and is unable to find the id of the treeview in update panel and shows control undefined
Is there any other way to group the data on the basis of 'ParentI3D' and having sorting and paging functionality enabled
Here is the design of my treelist:
<asp:UpdatePanel ID="upPanel" runat="server" UpdateMode="Always"> <ContentTemplate> <telerik:RadTreeList ID="gvCustomerMonitorFailures" runat="server" ParentDataKeyNames="ParentI3D" ClientIDMode="Static" DataKeyNames="I3D" AllowPaging="true" PageSize="5" AutoGenerateColumns="false" AllowSorting="true" ShowTreeLines="false" GridLines="None" AllowMultiItemSelection="true"> <ClientSettings Selecting-AllowItemSelection="false"> <ClientEvents OnItemSelected="gvCustomerMonitorFailures_OnItemSelected" OnItemClick="gvCustomerMonitorFailures_OnItemClick"> </ClientEvents> </ClientSettings> <Columns> <telerik:TreeListBoundColumn DataField="DisplayName" UniqueName="DisplayName" HeaderText="" HeaderStyle-Width="35px" /> <telerik:TreeListTemplateColumn DataField="IsCheck" UniqueName="IsCheck" HeaderText=""> <ItemTemplate> <img src='<%# ProcessMyDataItem(Eval("IsCheck")) %>' id="DisplayIsDeleted" alt="" style="margin-left: 5px; margin-top: 5px; width: 16px; height: 16px;" /> </ItemTemplate> <HeaderStyle Width="35px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:TreeListTemplateColumn> <telerik:TreeListTemplateColumn DataField="IsProblems" UniqueName="IsProblems" HeaderText=""> <ItemTemplate> <img src='<%# ProcessMyDataItem(Eval("IsProblems")) %>' id="DisplayIsDeleted" alt="" style="margin-left: 5px; margin-top: 5px; width: 16px; height: 16px;" /> </ItemTemplate> <HeaderStyle Width="35px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:TreeListTemplateColumn> <telerik:TreeListTemplateColumn DataField="IsProcessorPerformance" UniqueName="IsProcessorPerformance" HeaderText=""> <ItemTemplate> <img src='<%# ProcessMyDataItem(Eval("IsProcessorPerformance")) %>' id="DisplayIsDeleted" alt="" style="margin-left: 5px; margin-top: 5px; width: 16px; height: 16px;" /> </ItemTemplate> <HeaderStyle Width="35px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:TreeListTemplateColumn> <telerik:TreeListBoundColumn DataField="Description" UniqueName="Description" HeaderText="<%$ Resources:CEntronResource, clmDescription %>"> <ItemStyle HorizontalAlign="Right" /> </telerik:TreeListBoundColumn> <telerik:TreeListBoundColumn DataField="StartAsString" UniqueName="StartAsString" HeaderText="<%$ Resources:CEntronResource, clmStart %>" /> <telerik:TreeListBoundColumn DataField="FinishAsString" UniqueName="FinishAsString" HeaderText="<%$ Resources:CEntronResource, clmFinish %>" /> <telerik:TreeListBoundColumn DataField="Time" UniqueName="Time" HeaderText="<%$ Resources:CEntronResource, clmTime %>" /> <telerik:TreeListBoundColumn DataField="FailureReason" UniqueName="FailureReason" HeaderText="<%$ Resources:CEntronResource, clmFailureReason %>" /> </Columns> </telerik:RadTreeList> </ContentTemplate> </asp:UpdatePanel>
I am using RadTreeList and doing the hierarchical binding of data by keeping that in the update panel and doing server side binding using AjaxManager and keep the paging enabled.
Whenever I click on any page number or Group(-) Image on the top left of the tree list it throws java script error and treelist got crashed and is unable to find the id of the treeview in update panel and shows control undefined
Is there any other way to group the data on the basis of 'ParentI3D' and having sorting and paging functionality enabled
Here is the design of my treelist:
<asp:UpdatePanel ID="upPanel" runat="server" UpdateMode="Always"> <ContentTemplate> <telerik:RadTreeList ID="gvCustomerMonitorFailures" runat="server" ParentDataKeyNames="ParentI3D" ClientIDMode="Static" DataKeyNames="I3D" AllowPaging="true" PageSize="5" AutoGenerateColumns="false" AllowSorting="true" ShowTreeLines="false" GridLines="None" AllowMultiItemSelection="true"> <ClientSettings Selecting-AllowItemSelection="false"> <ClientEvents OnItemSelected="gvCustomerMonitorFailures_OnItemSelected" OnItemClick="gvCustomerMonitorFailures_OnItemClick"> </ClientEvents> </ClientSettings> <Columns> <telerik:TreeListBoundColumn DataField="DisplayName" UniqueName="DisplayName" HeaderText="" HeaderStyle-Width="35px" /> <telerik:TreeListTemplateColumn DataField="IsCheck" UniqueName="IsCheck" HeaderText=""> <ItemTemplate> <img src='<%# ProcessMyDataItem(Eval("IsCheck")) %>' id="DisplayIsDeleted" alt="" style="margin-left: 5px; margin-top: 5px; width: 16px; height: 16px;" /> </ItemTemplate> <HeaderStyle Width="35px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:TreeListTemplateColumn> <telerik:TreeListTemplateColumn DataField="IsProblems" UniqueName="IsProblems" HeaderText=""> <ItemTemplate> <img src='<%# ProcessMyDataItem(Eval("IsProblems")) %>' id="DisplayIsDeleted" alt="" style="margin-left: 5px; margin-top: 5px; width: 16px; height: 16px;" /> </ItemTemplate> <HeaderStyle Width="35px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:TreeListTemplateColumn> <telerik:TreeListTemplateColumn DataField="IsProcessorPerformance" UniqueName="IsProcessorPerformance" HeaderText=""> <ItemTemplate> <img src='<%# ProcessMyDataItem(Eval("IsProcessorPerformance")) %>' id="DisplayIsDeleted" alt="" style="margin-left: 5px; margin-top: 5px; width: 16px; height: 16px;" /> </ItemTemplate> <HeaderStyle Width="35px" /> <ItemStyle HorizontalAlign="Center" /> </telerik:TreeListTemplateColumn> <telerik:TreeListBoundColumn DataField="Description" UniqueName="Description" HeaderText="<%$ Resources:CEntronResource, clmDescription %>"> <ItemStyle HorizontalAlign="Right" /> </telerik:TreeListBoundColumn> <telerik:TreeListBoundColumn DataField="StartAsString" UniqueName="StartAsString" HeaderText="<%$ Resources:CEntronResource, clmStart %>" /> <telerik:TreeListBoundColumn DataField="FinishAsString" UniqueName="FinishAsString" HeaderText="<%$ Resources:CEntronResource, clmFinish %>" /> <telerik:TreeListBoundColumn DataField="Time" UniqueName="Time" HeaderText="<%$ Resources:CEntronResource, clmTime %>" /> <telerik:TreeListBoundColumn DataField="FailureReason" UniqueName="FailureReason" HeaderText="<%$ Resources:CEntronResource, clmFailureReason %>" /> </Columns> </telerik:RadTreeList> </ContentTemplate> </asp:UpdatePanel>
Here is the Ajax request event which I used to call on my another control click: /// <summary>
/// Handles the AjaxRequest event of the RadAjaxManager1 control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="Telerik.Web.UI.AjaxRequestEventArgs"/> instance containing the event data.</param>
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
//UserControl treelist = (UserControl)this.FindControl("serverComptDetailsView");
UpdatePanel updPanel = (UpdatePanel)serverComptDetailsView.FindControl("upPanel");
RadTreeList treelist = (RadTreeList)serverComptDetailsView.FindControl("gvCustomerMonitorFailures");
CEntronRestServiceClient serviceClient = new CEntronRestServiceClient();
RequestOfint request = new RequestOfint();
request.Data = Convert.ToInt32(e.Argument.ToString());
ResponseOfMonitoringDataFailureDTOHGZ00jlC response = new ResponseOfMonitoringDataFailureDTOHGZ00jlC();
response = serviceClient.GetMonitoringDataFailureDetailByDeviceID(request);
treelist.DataSource = response.Result;
}