| <MasterTableView DataKeyNames="id"> |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="Street" DataField="Address.Street" /> |
| <telerik:GridBoundColumn HeaderText="HouseNumber" DataField="Address.HouseNumber" /> |
| <telerik:GridBoundColumn HeaderText="ZipCode" DataField="Address.ZipCode.Code" /> |
| <telerik:GridBoundColumn HeaderText="City" DataField="Address.ZipCode.City" /> |
| </Columns> |
| </MasterTableView> |
| // Javascript |
| var selectedItem = $find("MyGridClientID").get_masterTableView().get_selectedItems()[0]; |
| var selectedItemID = selectedItem.getDataKeyValue("id"); |
using System;using System.Data;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Telerik.Web.UI;using System.Text.RegularExpressions;public partial class Spreadsheet : System.Web.UI.Page{ protected global::System.Web.UI.WebControls.Literal dataRow; protected void Page_Init(object sender, System.EventArgs e) { DefineGridStructure(); } protected void Page_Load(object sender, EventArgs e) { RadGrid grid = (RadGrid)PlaceHolder1.FindControl("RadGrid1"); RadAjaxManager1.AjaxSettings.AddAjaxSetting(grid, grid); if (Page.IsPostBack) { Label1.Text += "Post back!! <br>"; } if (!Page.IsPostBack) { Label1.Text += "Page_Load; " + DateTime.Now.ToString() + "<br>"; } } private void DefineGridStructure() { RadGrid RadGrid1 = new RadGrid(); RadGrid1.ID = "RadGrid1"; System.Drawing.Color disabledBackColor = System.Drawing.Color.AliceBlue; System.Drawing.Color defaultBorderColor = System.Drawing.Color.Black; RadGrid1.Width = Unit.Percentage(100); RadGrid1.PageSize = 7; RadGrid1.GridLines = GridLines.Both; RadGrid1.AllowPaging = true; RadGrid1.AllowSorting = true; RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; RadGrid1.ShowFooter = true; RadGrid1.AutoGenerateColumns = false; RadGrid1.ShowStatusBar = true; RadGrid1.DataSourceID = "ObjectDataSource1"; RadGrid1.ItemDataBound += RadGrid1_ItemDataBound; RadGrid1.UpdateCommand += RadGrid1_UpdateCommand; RadGrid1.MasterTableView.PageSize = 7; RadGrid1.MasterTableView.Height = Unit.Percentage(100); RadGrid1.MasterTableView.DataKeyNames = new string[] { "report_id" }; RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace; GridEditCommandColumn editColumn; editColumn = new GridEditCommandColumn(); editColumn.UniqueName = "EditCommandColumn"; editColumn.ItemStyle.BackColor = disabledBackColor; editColumn.ItemStyle.BorderColor = defaultBorderColor; editColumn.ItemStyle.BorderWidth = Unit.Pixel(1); RadGrid1.MasterTableView.Columns.Add(editColumn); GridColumnGroup headerGroupColumn; GridBoundColumn boundColumn = new GridBoundColumn(); boundColumn.DataField = "report_id"; boundColumn.HeaderText = "report_id"; boundColumn.ItemStyle.BackColor = disabledBackColor; boundColumn.ItemStyle.BorderColor = defaultBorderColor; boundColumn.ItemStyle.BorderWidth = Unit.Pixel(1); boundColumn.ReadOnly = true; RadGrid1.MasterTableView.Columns.Add(boundColumn); RadGrid1.MasterTableView.AllowMultiColumnSorting = true; RadGrid1.MasterTableView.SortExpressions.Clear(); GridSortExpression expression = new GridSortExpression(); expression.FieldName = "report_id"; expression.SortOrder = GridSortOrder.Ascending; RadGrid1.MasterTableView.SortExpressions.AddSortExpression(expression); DataTable GroupHeaders = WastewaterGrid.GetGroupHeaders(); DataTable Headers; foreach (DataRow groupRow in GroupHeaders.Rows) { String masterGroupName = groupRow["group_name"].ToString(); String groupColumnHeader = groupRow["group_column_header"].ToString(); Headers = WastewaterGrid.GetHeaders(masterGroupName); headerGroupColumn = new GridColumnGroup(); headerGroupColumn.Name = masterGroupName; headerGroupColumn.HeaderText = groupColumnHeader; RadGrid1.MasterTableView.ColumnGroups.Add(headerGroupColumn); foreach (DataRow headerRow in Headers.Rows) { String groupName = headerRow["group_name"].ToString(); String columnName = headerRow["column_name"].ToString(); String columnHeader = headerRow["column_header"].ToString(); String attributeType = headerRow["attribute_type"].ToString(); String dataType = headerRow["data_type"].ToString(); String targetValue = headerRow["target_value"].ToString(); if (!groupName.Equals(masterGroupName)) { continue; } boundColumn = new GridBoundColumn(); boundColumn.DataField = columnName; boundColumn.HeaderText = columnHeader; // where is the uniquename? boundColumn.ColumnGroupName = masterGroupName; if (columnName.Equals("MISDnotes")) { boundColumn.ItemStyle.Width = Unit.Percentage(100); } if (!attributeType.Equals("ManualEntry")) { boundColumn.ItemStyle.BackColor = disabledBackColor; boundColumn.ReadOnly = true; } RadGrid1.MasterTableView.Columns.Add(boundColumn); } } this.PlaceHolder1.Controls.Add(RadGrid1); } public class FooterItem { private String _columnName; private int _count; private dynamic _min; private dynamic _max; private dynamic _sum; public FooterItem(String str) { _columnName = str; _count = 0; } public String columnName { get { return _columnName; } set { _columnName = value; } } public int count { get { return _count; } set { _count = value; } } public dynamic min { get { return _min; } set { _min = value; } } public dynamic max { get { return _max; } set { _max = value; } } public dynamic sum { get { return _sum; } set { _sum = value; } } } protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { Int32 userRole = 2; Int32 today = int.Parse("20110907"); //String today = DateTime.Today.ToString("yyyyMMdd"); String columnName; String attributeType; GridTableCell gridCell; dynamic cellText; Boolean cellPopped = false; TextBox cellTextBox; Dictionary<String, FooterItem> FooterAggregates = new Dictionary<String, FooterItem>(); FooterItem footerItem; DataTable Headers = WastewaterGrid.GetHeaders(); foreach (DataRow row in Headers.Rows) { columnName = row["column_name"].ToString(); attributeType = row["attribute_type"].ToString(); if (!attributeType.Contains("varchar")) { FooterAggregates.Add(columnName, new FooterItem(columnName)); } } if (e.Item is GridDataItem) { GridDataItem gridRow = (GridDataItem)e.Item; Int32 ReportID = int.Parse(gridRow.GetDataKeyValue("report_id").ToString()); System.Drawing.Color defaultBorderColor = System.Drawing.Color.Black; System.Drawing.Color ableBackColor = System.Drawing.Color.White; System.Drawing.Color disabledBackColor = System.Drawing.Color.AliceBlue; System.Drawing.Color ableBorderColor = System.Drawing.Color.Lime; foreach (DataRow row in Headers.Rows) { columnName = row["column_name"].ToString(); attributeType = row["attribute_type"].ToString(); gridCell = (GridTableCell)gridRow[columnName]; //cellText = gridCell.Text; cellText = ((DataRowView)gridRow.DataItem)[columnName]; cellPopped = !String.IsNullOrEmpty((String)cellText); if (cellPopped) { footerItem = FooterAggregates[columnName]; footerItem.count += 1; if (footerItem.min == null) { footerItem.min = cellText; } else { if (footerItem.min > cellText) { footerItem.min = cellText; } } if (footerItem.max == null) { footerItem.max = cellText; } else { if (footerItem.max < cellText) { footerItem.max = cellText; } } if (footerItem.sum == null) { footerItem.sum = cellText; } else { footerItem.sum += cellText; } } gridCell.BorderColor = defaultBorderColor; gridCell.BorderWidth = Unit.Pixel(1); if (userRole == 1) { if (attributeType.Equals("ManualEntry")) { gridCell.BackColor = ableBackColor; gridCell.BorderColor = ableBorderColor; } } else { if (attributeType.Equals("ManualEntry")) { if (!ReportID.Equals(today)) { if (String.IsNullOrEmpty(cellText)) { gridCell.BackColor = ableBackColor; gridCell.BorderColor = ableBorderColor; } else { gridCell.BackColor = disabledBackColor; } } else { gridCell.BackColor = ableBackColor; gridCell.BorderColor = ableBorderColor; } } if (e.Item.IsInEditMode && !ReportID.Equals(today) && cellPopped) { cellTextBox = (TextBox)gridCell.Controls[0]; cellTextBox.BorderStyle = BorderStyle.None; cellTextBox.BackColor = disabledBackColor; cellTextBox.ReadOnly = true; //Label1.Text += "EditMode::ReportID=" + ReportID + "columnName=" + columnName + "::cellText=" + cellText + " <br>"; } } } } if (e.Item is GridFooterItem) { GridFooterItem gridRow = (GridFooterItem)e.Item; int count = 0; dynamic min; dynamic max; dynamic sum; foreach (DataRow row in Headers.Rows) { columnName = row["column_name"].ToString(); attributeType = row["attribute_type"].ToString(); gridCell = (GridTableCell)gridRow[columnName]; //cellText = gridCell.Text; cellText = ((DataRowView)gridRow.DataItem)[columnName]; footerItem = FooterAggregates[columnName]; count += footerItem.count; } } } private void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) { Label1.Text += " Table to be updated: " + e.Item.OwnerTableView.DataMember + "<br>"; GridEditableItem editedItem = e.Item as GridEditableItem; GridEditManager editMan = editedItem.EditManager; Int32 ReportID = int.Parse(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["report_id"].ToString()); String Login = "David-T420s\\davidk"; foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns) { if (column.UniqueName.Equals("report_id")) { continue; } if (column is IGridEditableColumn) { Boolean isEditable = column.IsEditable; String editColumnName = column.UniqueName.ToString(); String ResultString; IGridEditableColumn editableCol = (column as IGridEditableColumn); if (editableCol.IsEditable) { IGridColumnEditor editor = editMan.GetColumnEditor(editableCol); if (editor is GridTextColumnEditor) { String Datum = (editor as GridTextColumnEditor).Text.Trim(); DataTable Headers = WastewaterGrid.GetHeaders(); foreach (DataRow row in Headers.Rows) { String columnName = row["column_name"].ToString(); String dataType = row["data_type"].ToString(); if (columnName.Equals(editColumnName)) { ResultString = ValidateUserInput(dataType, Datum); if (!ResultString.Equals("valid")) { RadAjaxManager1.Alert(ResultString); e.Canceled = true; break; } else { try { WastewaterGrid.UpsertDatum(ReportID, editColumnName, Datum, Login); } catch (Exception ex) { Label1.Text += "<strong>Unable to set value of column '" + column.UniqueName + "'</strong> <br>" + ex.Message; RadAjaxManager1.Alert("Unable to set value of column: " + column.UniqueName + "; " + ex.Message); e.Canceled = true; break; } } } } } } } } try { WastewaterGrid.ReCalculate(ReportID); } catch (Exception ex) { RadAjaxManager1.Alert("Unable to run ReCalculate: " + ex.Message); e.Canceled = true; } } private String ValidateUserInput(String dataType, String Datum) { if (String.IsNullOrEmpty(Datum)) { return "valid"; } Match match; String ResultString; String TestString; Int32 stringLength = Datum.Length; String IntPattern = @"^\d+$"; RadAjaxManager1.Alert("VALIDATEUSERINPUT: dataType=\"" + dataType + "\"; Datum=\"" + Datum + "\""); switch (dataType) { case "bigint": match = Regex.Match(Datum, IntPattern); if (match.Success) { try { TestString = Int64.Parse(Datum).ToString(); } catch (OverflowException) { return "Overflow Exception: improper " + dataType + "format in \"" + Datum + "\""; } } else { return "Improper format: Int64"; } break; case "decimal(10,2)": ResultString = ValidateDecimalFormat(dataType, Datum, stringLength, 10, 2); if (!ResultString.Equals("valid")) { return ResultString; } else { try { TestString = Decimal.Parse(Datum).ToString(); } catch (OverflowException) { return "Overflow Exception: improper " + dataType + "format in \"" + Datum + "\""; } } break; case "decimal(10,3)": ResultString = ValidateDecimalFormat(dataType, Datum, stringLength, 10, 3); if (!ResultString.Equals("valid")) { return ResultString; } else { try { TestString = Decimal.Parse(Datum).ToString(); } catch (OverflowException) { return "Overflow Exception: improper " + dataType + "format in \"" + Datum + "\""; } } break; case "decimal(4,1)": ResultString = ValidateDecimalFormat(dataType, Datum, stringLength, 4, 1); if (!ResultString.Equals("valid")) { return ResultString; } else { try { TestString = Decimal.Parse(Datum).ToString(); } catch (OverflowException) { return "Overflow Exception: improper " + dataType + "format in \"" + Datum + "\""; } } break; case "decimal(5,1)": ResultString = ValidateDecimalFormat(dataType, Datum, stringLength, 5, 1); if (!ResultString.Equals("valid")) { return ResultString; } else { try { TestString = Decimal.Parse(Datum).ToString(); } catch (OverflowException) { return "Overflow Exception: improper " + dataType + "format in \"" + Datum + "\""; } } break; case "decimal(6,1)": ResultString = ValidateDecimalFormat(dataType, Datum, stringLength, 6, 1); if (!ResultString.Equals("valid")) { return ResultString; } else { try { TestString = Decimal.Parse(Datum).ToString(); } catch (OverflowException) { return "Overflow Exception: improper " + dataType + "format in \"" + Datum + "\""; } } break; case "int": match = Regex.Match(Datum, IntPattern); if (match.Success) { try { TestString = Int32.Parse(Datum).ToString(); //throw new CustomExceptions. } catch (OverflowException) { return "Overflow Exception: improper " + dataType + "format in \"" + Datum + "\""; } } else { return "Improper format: Int32"; } break; case "varchar(25)": if (stringLength > 25) { return "Improper " + dataType + "format in \"" + Datum + "\""; } break; case "varchar(255)": if (stringLength > 255) { return "Improper " + dataType + "format in \"" + Datum + "\""; } break; default: RadAjaxManager1.Alert("Unhandled data type"); return "Unhandled data type: \"" + dataType + "\""; } return "valid"; } private String ValidateDecimalFormat(String dataType, String Datum, int stringLength, int precision, int scale) { Match match; String IntPattern = @"^\d+$"; String ResultString; Int32 decimalIndex = Datum.IndexOf("."); if (decimalIndex > 0) { Int32 fractionalLength = stringLength - decimalIndex - 1; if (fractionalLength > scale) { return "Improper " + dataType + "format in \"" + Datum + "\""; } Int32 integralLength = stringLength - fractionalLength - 1; if (integralLength > (precision - scale)) { return "Improper " + dataType + "format in \"" + Datum + "\""; } String integralString = Datum.Substring(0, decimalIndex); String fractionalString = Datum.Substring(decimalIndex + 1, fractionalLength); match = Regex.Match(integralString, IntPattern); if (match.Success) { match = Regex.Match(fractionalString, IntPattern); if (match.Success) { ResultString = "valid"; } else { ResultString = "Improper " + dataType + "format in \"" + Datum + "\""; } } else { ResultString = "Improper " + dataType + "format in \"" + Datum + "\""; } } else if (stringLength > (precision - scale)) { ResultString = "Improper " + dataType + "format in \"" + Datum + "\""; } else { match = Regex.Match(Datum, IntPattern); if (match.Success) { ResultString = "valid"; } else { ResultString = "Improper " + dataType + "format in \"" + Datum + "\""; } } return ResultString; }}I need to add a default value to one of the textboxes when adding a new item in the grid
<telerik:GridTemplateColumn HeaderText="Activity ID" SortExpression="activityID" UniqueName="activityID" >
<ItemTemplate>
<%# Eval("activityID")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" ID="txtActivity" Text='<%# Bind("activityID") %>' />
<asp:RequiredFieldValidator runat="server" ID="rfvActivity" ControlToValidate="txtActivity" Display="Dynamic" ErrorMessage="*" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
When clicking “Add new recored” I need to pre-populate the txtActivity textbox. How can I access this from the code behind?
I tried this with no success
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
TextBox t = (TextBox)(editedItem.FindControl("txtActivity"));
}
}
And this:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridCommandItem && e.Item.OwnerTableView.IsItemInserted)
{
TextBox txtActivity = (TextBox)e.Item.FindControl("txtActivity");
txtActivity.Text = "300";
}
}
I am running out of ideas.
Please help. Thanks
<telerik:GridDateTimeColumn FilterControlWidth="140px" DataField="Datum" HeaderText="Datum" SortExpression="Datum" UniqueName="Datum" PickerType="DateTimePicker" EnableRangeFiltering="true" CurrentFilterFunction="Between" ReadOnly="True" AllowFiltering="True" FilterListOptions="VaryByDataType"> <HeaderStyle Width="220px" /></telerik:GridDateTimeColumn><rad:RadGrid ID="GridSummary" runat="server" OnColumnCreated="Grid_ColumnCreated" OnItemCreated="Grid_ItemCreated" OnItemDataBound="Grid_ItemDataBound" EnableEmbeddedSkins="false" Skin="MetroMagenta" Width="900px" AutoGenerateColumns="false"> <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" OnDataBound="Grid_DataBound" DataKeyNames="RecordId, ParentRecordId, RecordName"> <SelfHierarchySettings ParentKeyName="ParentRecordId" KeyName="RecordId" /> <Columns> <rad:GridBoundColumn DataField="RecordName" UniqueName="RecordName" HeaderText="" /> <rad:GridBoundColumn DataField="SocialVolume" UniqueName="SocialVolume" HeaderText="Social Volume" HeaderStyle-Width="150px" ItemStyle-Width="150px" /> <rad:GridBoundColumn DataField="CaseVolume" UniqueName="CaseVolume" HeaderText="Case Volume" HeaderStyle-Width="150px" ItemStyle-Width="150px" /> <rad:GridBoundColumn DataField="HelpVolume" UniqueName="HelpVolume" HeaderText="Help Volume" HeaderStyle-Width="150px" ItemStyle-Width="150px" /> </Columns> </MasterTableView> <ClientSettings AllowExpandCollapse="true" /> </rad:RadGrid>
<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)