<telerik:RadGrid EnableEmbeddedSkins="false" CssClass="RadGrid_Outlook grid-inside-section"
ID="rdGridReport" runat="server" AutoGenerateColumns="False" PageSize="10"
AllowSorting="true" AllowPaging="true" Skin="Outlook">
<ClientSettings EnableRowHoverStyle="true">
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView DataKeyNames="ReportId" ClientDataKeyNames="ReportId" HeaderStyle-VerticalAlign="Top"
HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
<DetailTables>
<telerik:GridTableView DataKeyNames="ID" runat="server" Name="sample" Width="100%" PageSize="10">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="ReportId" MasterKeyField="ReportId" />
</ParentTableRelation>
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
<Columns>
<telerik:GridTemplateColumn UniqueName="chkID" DataField="ID" HeaderStyle-Width="25px"
AllowFiltering="false" ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
<asp:CheckBox ID="cbAllCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAllCheckBoxes"
onclick="MakeDirty(this);" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkOTCID" runat="server" Width="12px" onclick="checkboxClicked(event, this.id)" />
</ItemTemplate>
<HeaderStyle Width="25px" />
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderStyle-Width="50px"
ItemStyle-HorizontalAlign="Left">
<HeaderStyle Width="50px" />
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn UniqueName="ID" DataField="ID" HeaderText="ID" Visible="false" />
<telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" UniqueName="pName" DataField="pName"
HeaderText="Project" HeaderStyle-Width="20%" />
<telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" UniqueName="File" DataField="PropertyNumber"
HeaderText="File" HeaderStyle-Width="20%" />
<telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" UniqueName="FileType" DataField="FileType"
HeaderText="File Type" HeaderStyle-Width="20%" />
<telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" UniqueName="DescriptionDate"
DataField="DescriptionDate" HeaderText="Description Date"
HeaderStyle-Width="10%" />
<telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" UniqueName="Status" DataField="Status"
HeaderText="Status" HeaderStyle-Width="15%" />
<telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete"
ConfirmDialogType="Classic" ConfirmTitle="Confirm Delete" ConfirmText="Are you sure you want to delete this record?"
ItemStyle-HorizontalAlign="Left">
<HeaderStyle Width="50px" />
</telerik:GridButtonColumn>
<telerik:GridTemplateColumn Visible="false">
<ItemTemplate>
<asp:Label ID="lbStatus" runat="server" Text='<%#Bind("Status") %>'></asp:Label>
<asp:Label ID="lbPropertyActive" runat="server" Text='<%#Bind("Active") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings EditFormType="WebUserControl" UserControlName="~/Approvals.ascx">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
</telerik:GridTableView>
</DetailTables>
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ReportId" HeaderText="ReportId" UniqueName="ReportId"
Visible="false" />
<telerik:GridBoundColumn DataField="ReportName" HeaderText="Report Name" UniqueName="ReportName">
<HeaderStyle Width="200px" />
<ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="lbDownLoadReport" runat="server" Text="OTC Report" CommandName="Download"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="UnSubmit">
<ItemTemplate>
<asp:LinkButton ID="lbUnSubmitReport" runat="server" Text="UnSubmit Report" ToolTip="UnSubmit Report"
CommandName="UnSubmit" OnClientClick="if( ! OTCReportcheck()) return false;"></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" />
</telerik:GridTemplateColumn>
</Columns>
<ItemStyle VerticalAlign="Top" Wrap="True" />
<HeaderStyle VerticalAlign="Top" />
</MasterTableView>
</telerik:RadGrid>
-----------------------------------------------------------
Above is html of grid , poblem i am facing
I delete the last record using the Delete button in DetailTables (last column) ,telerik inbuilt javascript breaks .
Although it works fine when record reaches at top using sorting.
Following is error log:
ception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.layouts_singlelayout_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously).
----------------------------
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index)
at Telerik.Web.UI.GridTableView.SetDataSourceFilter()
at Telerik.Web.UI.GridTableView.FilterDetailDataSource()
at Telerik.Web.UI.GridTableView.DataBind()
at Telerik.Web.UI.GridTableView.Rebind()
at Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source)
at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)