or
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" Skin="Black" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated" AllowSorting="True" AllowMultiRowSelection="False" OnItemCommand="RadGrid1_ItemCommand" AutoGenerateEditColumn="false" OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource" OnInsertCommand="RadGrid1_InsertCommand" OnDataBound="RadGrid1_DataBound" OnPreRender="RadGrid1_PreRender" > <MasterTableView DataKeyNames="TempAccountsId" ShowFooter="true" TableLayout="Fixed" AllowMultiColumnSorting="True" EditMode="InPlace" > <DetailTables> <telerik:GridTableView DataKeyNames="FixedId" CommandItemDisplay="Top" TableLayout="Fixed" Name="Fixed" ShowFooter="true" EditMode="InPlace" AllowAutomaticUpdates="false"> <Columns> <telerik:GridTemplateColumn Visible="false"> <ItemTemplate> <asp:Label ID="lblFixedId" runat="server" Text='<%#Eval("FixedId") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit" UniqueName="Edit" ItemStyle-Width="25px" HeaderStyle-HorizontalAlign="Center" EditImageUrl="../Images/edit.gif" ItemStyle-HorizontalAlign="Center"> </telerik:GridEditCommandColumn> <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="40px" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:ImageButton runat="server" ID="imgdelete" OnClientClick="return confirm('Are you sure that you want to Delete?');" ImageUrl="../Images/delete.gif" CommandName="Delete" CommandArgument="" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="Jan" HeaderText="Jan" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px"> <ItemTemplate> <asp:Label ID="lblJan" runat="server" Text='<%# string.Format("{0:n}", Convert.ToDecimal(Eval("Jan"))) %>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtJanEdit" Width="70px" runat="server" MaxLength="11" Text='<%# string.Format("{0:n}", Convert.ToDecimal(Eval("Jan"))) %>' CssClass="AlgRgh" onkeypress="javascript:return Allownumbersonly(event);" BorderWidth="1px"></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="txtJanInsert" runat="server" Width="70px" MaxLength="11" CssClass="AlgRgh" onkeypress="javascript:return Allownumbersonly(event);" BorderWidth="1px"></asp:TextBox> </InsertItemTemplate> <FooterTemplate> <asp:Label ID="lblJanFooter" runat="server"></asp:Label> </FooterTemplate> </telerik:GridTemplateColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridTemplateColumn HeaderText="AccountId" UniqueName="TempAccountsId" Visible="false"> <ItemTemplate> <asp:Label ID="lblTempAccountsId" runat="server" Text='<%#Eval("TempAccountsId") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Account Number" UniqueName="AccountNumber" ItemStyle-Width="120px" HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left"> <ItemTemplate> <asp:Label ID="lblAccountNumber" runat="server" Text='<%#Eval("AccountNumber") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Account Name" UniqueName="AccountName" ItemStyle-Width="140px" HeaderStyle-Width="140px" HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left"> <ItemTemplate> <asp:Label ID="lblAccountName" runat="server" Text='<%#Eval("AccountName") %>'></asp:Label> </ItemTemplate> <FooterTemplate> <asp:Label ID="lbltotalFooter" runat="server" Text="Total:"></asp:Label> </FooterTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderStyle-Width="60" UniqueName="Jan" HeaderText="" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" Aggregate="Sum" DataField="Jan" FooterAggregateFormatString="{0:n}"> </telerik:GridTemplateColumn> </Columns> </MasterTableView> <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true"> </ClientSettings></telerik:RadGrid>protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { if (!e.IsFromDetailTable) { //DGeneral gen = new DGeneral(); //RadGrid1.DataSource = gen.GetAccountDetailsbyTabName("Fixed"); Dfixed fix = new Dfixed(); RadGrid1.DataSource = fix.GetFixedAccountsDetails(Convert.ToInt32(Session["Propertyid"].ToString()), Convert.ToInt32(Session["BudgetYear"].ToString())); } }protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e) { Dfixed fix = new Dfixed(); GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; switch (e.DetailTableView.Name) { case "Fixed": { int AccountID = Convert.ToInt32(dataItem.GetDataKeyValue("TempAccountsId").ToString()); e.DetailTableView.DataSource = fix.GetFixedByAccountId(AccountID, Convert.ToInt32(Session["BudgetYear"].ToString()), Convert.ToInt32(Session["Propertyid"].ToString())); break; } case "OrderDetails": { //string OrderID = dataItem.GetDataKeyValue("OrderID").ToString(); //e.DetailTableView.DataSource = GetDataTable("SELECT * FROM [Order Details] WHERE OrderID = " + OrderID); break; } } } protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e) { string exepUpdate = ""; try { if (e.CommandName.Equals(RadGrid.UpdateCommandName)) { if (e.Item.OwnerTableView.Name == "Fixed") { bool ResultSuccess = false; Dfixed fix = new Dfixed(); GridEditableItem item = e.Item as GridEditableItem; Label lblFixedId = (Label)item.FindControl("lblFixedId"); int GenId = Convert.ToInt32(lblFixedId.Text.Trim().ToString()); TextBox txtDescriptionEdit = (TextBox)item.FindControl("txtDescriptionEdit"); TextBox txtJanEdit = (TextBox)item.FindControl("txtJanEdit"); if (txtJanEdit.Text.Trim().ToString() != string.Empty) { Jan = Convert.ToDouble(txtJanEdit.Text.Trim().ToString()); } total = Jan + Feb + Mar + Apr + May + Jun + July + Aug + Sep + Oct + Nov + Dec; long? Retablesqfeet = fix.GetPropertyRentalsqfeet(Convert.ToInt32(Session["Propertyid"].ToString())); double? genpersqft = total / Retablesqfeet; ResultSuccess = fix.EditFixedDetails(GenId, Jan, Feb, Mar, Apr, May, Jun, July, Aug, Sep, Oct, Nov, Dec, total, genpersqft, txtDescriptionEdit.Text.Trim().ToString()); if (ResultSuccess) { RadGrid1.Rebind(); } else { DisplayMessage("Please Verify the values"); e.Canceled = true; } } } } catch (Exception) { exepUpdate = "Please Verify the values you have changed in editable fields"; } finally { if (exepUpdate != "") { e.Canceled = true; DisplayMessage("Fixed Record cannot be Updated. Reason: " + exepUpdate.ToString()); } } }

function genericControl_init(sender, args){ $create(GenericObject, sender);}function GenericObject(){};GenericObject.prototype = { someFunction: function (sender, args) { console.log(this.someProperty)//undefined console.log(this);//this is not the GenericObject }, get_id: function () { return this.id }, set_id: function (id) { this.id = id }, beginUpdate: function () { return true }, endUpdate: function () { return true }}genericControl_init({ "id": "ct101_someControl", "someProperty": "ct101_someControl_someClientID" });RadComboBox1.OnClientSelectedIndexChanged = String.Format("$find('{0}').{1}", ClientID, "someFunction");Here is my Code, Page_load method and RadGrid1_NeedDataSource.
The result is so weird, load in the 1 page, everything work find, when click next or 2nd page, the problem is occurs. The diagram show at Attach files.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load RadGrid1.ID = "RadGrid1" zzz.Controls.Add(RadGrid1) AddHandler Me.RadGrid1.NeedDataSource, New GridNeedDataSourceEventHandler(AddressOf Me.RadGrid1_NeedDataSource) RadGrid1.Visible = True RadGrid1.AllowPaging = True RadGrid1.AllowSorting = True RadGrid1.AllowMultiRowSelection = True RadGrid1.MasterTableView.AutoGenerateColumns = False RadGrid1.PageSize = 5 RadGrid1.AutoGenerateColumns = False RadGrid1.MasterTableView.EditMode = GridEditMode.Batch RadGrid1.ClientSettings.Selecting.AllowRowSelect = True RadGrid1.EnableViewState = False RadAjaxManager1.EnableAJAX = True End SubProtected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Dim ConnString As String = ConfigurationManager.ConnectionStrings("myConnectionString").ConnectionString Dim conn As SqlConnection = New SqlConnection(ConnString) Dim adapter As SqlDataAdapter = New SqlDataAdapter adapter.SelectCommand = New SqlCommand("SELECT * FROM Product", conn) conn.Open() Try adapter.Fill(myDataTable) Finally conn.Close() End Try RadGrid1.DataSource = myDataTable Dim boundColumn As GridBoundColumn For Each col As System.Data.DataColumn In myDataTable.Columns boundColumn = New GridBoundColumn() RadGrid1.MasterTableView.Columns.Add(boundColumn) boundColumn.DataField = col.ColumnName boundColumn.HeaderText = col.ColumnName If col.ColumnName = "proID" Then 'boundColumn.Visible = False boundColumn.HeaderText = "ProductID" ElseIf col.ColumnName = "proName" Then boundColumn.HeaderText = "Product Name" ElseIf col.ColumnName = "proQty" Then boundColumn.HeaderText = "Product Quantity" ElseIf col.ColumnName = "unitPrice" Then boundColumn.HeaderText = "Price" End If Next End Sub