or
<telerik:RadGrid ID="grdUsers" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" ShowGroupPanel="True" DataSourceID="objUsers" OnItemDataBound="grdUsers_ItemDataBound"> <ClientSettings AllowDragToGroup="True"> </ClientSettings> <ExportSettings ExportOnlyData="true" HideStructureColumns="true" IgnorePaging="true" OpenInNewWindow="true" SuppressColumnDataFormatStrings="true"> </ExportSettings> <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="UserID" DataSourceID="objUsers"> <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToCsvButton="true" /> <HeaderStyle Font-Bold="true" HorizontalAlign="Left" /> <PagerStyle PageSizes="10,25,50,100,250" AlwaysVisible="true" /> <Columns> <telerik:GridBoundColumn DataField="UserName" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="UserName" UniqueName="UserName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserLogin" FilterControlAltText="Filter Login column" HeaderText="Login" SortExpression="UserLogin" UniqueName="UserLogin"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserEmail" FilterControlAltText="Filter Email column" HeaderText="Email" SortExpression="UserEmail" UniqueName="UserEmail"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn FilterControlAltText="Filter Phone column" HeaderText="Phone" SortExpression="UserPhone" UniqueName="UserPhone"> <ItemTemplate> <asp:Label ID="lblUserPhone" runat="server" Text='<%# FormatPhone(Eval("UserPhone").ToString()) %>'>></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridCheckBoxColumn DataField="UserActive" DataType="System.Boolean" FilterControlAltText="Filter Active column" HeaderText="Active" SortExpression="UserActive" UniqueName="UserActive" ItemStyle-HorizontalAlign="Center"> </telerik:GridCheckBoxColumn> <telerik:GridTemplateColumn Groupable="false" AllowFiltering="false" ShowSortIcon="false" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <telerik:RadButton ID="btnEditUser" runat="server" Font-Bold="True" Icon-PrimaryIconCssClass="rbEdit" CommandArgument='<%# Eval("UserID") %>' Text="Edit" OnCommand="btnEditUser_Command"> </telerik:RadButton> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView></telerik:RadGrid>protected void btnEditUser_Command(object sender, CommandEventArgs e){ string userID = e.CommandArgument.ToString(); RadWindow newWindow = new RadWindow(); newWindow.OnClientClose = "RefreshUsers"; newWindow.VisibleOnPageLoad = true; newWindow.KeepInScreenBounds = true; newWindow.Height = Unit.Parse("790"); newWindow.Width = Unit.Parse("750"); newWindow.NavigateUrl = "~/UserWindow.aspx?userid=" + userID; wndDetailsMgr.Windows.Add(newWindow);}
