or
<telerik:RadButton ID="btnToggle" runat="server" ToggleType="CustomToggle" ButtonType="ToggleButton"> <ToggleStates> <telerik:RadButtonToggleState Text="UnChecked" PrimaryIconCssClass="rbToggleCheckbox" /> <telerik:RadButtonToggleState Text="Filled" PrimaryIconCssClass="rbToggleCheckboxFilled" /> <telerik:RadButtonToggleState Text="Checked" PrimaryIconCssClass="rbToggleCheckboxChecked" /> </ToggleStates></telerik:RadButton> this._RadGrid1.AllowFilteringByColumn = true; this._RadGrid1.AllowSorting = true; this._RadGrid1.MasterTableView.AllowNaturalSort = true; this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName }; this._RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName }; this._RadGrid1.EnableLinqExpressions = false; this._RadGrid1.MasterTableView.NoMasterRecordsText = "No Products found."; this._RadGrid1.MasterTableView.Width = Unit.Percentage(100); this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = true; this._RadGrid1.AllowMultiRowSelection = true; this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource; this._RadGrid1.ItemDataBound += RadGrid1_ItemDataBound; GridBoundColumn boundColumn = new GridBoundColumn(); string columnName; #region RadGrid Columns GridClientSelectColumn selectAll = new GridClientSelectColumn(); selectAll.UniqueName = "SelectOne"; this._RadGrid1.MasterTableView.Columns.Add(selectAll);//Other columns templateColumn = new GridTemplateColumn(); templateColumnName = this._PriceDealProductBanTable.BillingAccountNumberColumn.ColumnName; this._RadGrid1.MasterTableView.Columns.Add(templateColumn); templateColumn.DataField = templateColumnName; templateColumn.ItemTemplate = new TextBoxTemplate(templateColumnName); templateColumn.HeaderText = "BAN"; templateColumn.UniqueName = "BAN"; templateColumn.AllowFiltering = false; public class TextBoxTemplate : ITemplate { protected RadTextBox _textBox; string _columnName; public TextBoxTemplate(string columnName) { this._columnName = columnName; } public void InstantiateIn(System.Web.UI.Control container) { this._textBox = new RadTextBox(); this._textBox.ID = this._columnName; container.Controls.Add(this._textBox); this._textBox.DataBinding += new EventHandler(_textBox_DataBinding); } void _textBox_DataBinding(object sender, EventArgs e) { RadTextBox txt = (RadTextBox)sender; GridDataItem container = (GridDataItem)txt.NamingContainer; txt.Text = ((DataRowView)container.DataItem)[this._columnName].ToString(); } }this._RadGrid1.AllowSorting = true; this._RadGrid1.MasterTableView.AllowNaturalSort = true; this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName }; this._RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { this._PriceDealProductBanTable.PriceDealEntityProductItemIdColumn.ColumnName }; this._RadGrid1.EnableLinqExpressions = false; this._RadGrid1.MasterTableView.NoMasterRecordsText = "No Products found."; this._RadGrid1.MasterTableView.Width = Unit.Percentage(100); this._RadGrid1.ClientSettings.Selecting.AllowRowSelect = true; this._RadGrid1.AllowMultiRowSelection = true; this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource; this._RadGrid1.ItemDataBound += RadGrid1_ItemDataBound; GridBoundColumn boundColumn = new GridBoundColumn(); string columnName; #region RadGrid Columns GridClientSelectColumn selectAll = new GridClientSelectColumn(); selectAll.UniqueName = "SelectOne"; this._RadGrid1.MasterTableView.Columns.Add(selectAll);if ((e.NewPageIndex + 1) == rgResults.PageCount){ showingRowsTo = GridSource.Tables[0].Rows.Count;}else{ showingRowsTo = (e.NewPageIndex + 1) * rgResults.PageSize;} string rowCount = string.Format("Displaying {0}-{1} of {2}", showingRowsFrom, showingRowsTo, GridSource.Tables[0].Rows.Count);lblResultsCountBottom.Text = lblResultsCountTop.Text = rowCount;$(document).ready(function () { var grid = $find("<%=rgResults.ClientID%>"); var mtv = grid.get_masterTableView(); var pageIndex = mtv.get_currentPageIndex(); alert(pageIndex);});