or
<telerik:RadGrid ID="rgLocations" runat="server" Width="100%" AutoGenerateColumns="false" Skin="Office2010Black" ItemStyle-BackColor="#ffe394" BorderColor="White" ShowFooter="false" OnNeedDataSource="rgLocations_NeedDataSource" OnInsertCommand="rgLocations_InsertCommand"> <AlternatingItemStyle BackColor="White" /> <FooterStyle BackColor="#cccccc" /> <HeaderStyle ForeColor="White" /> <PagerStyle AlwaysVisible="true" Position="TopAndBottom" ForeColor="White" /> <MasterTableView CommandItemDisplay="Top" DataKeyNames="ClientLocationID" > <Columns> <telerik:GridBoundColumn DataField="ClientLocationID" Visible="false" ReadOnly="true"/> <telerik:GridTemplateColumn HeaderText="Edit"> <ItemTemplate> <asp:ImageButton ID="ibtnEdit" ImageUrl="~/images/silk/pencil_go.png" CommandName="Edit" runat="server" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="ClientID" HeaderText="Client" Visible="false" ReadOnly="true" /> <telerik:GridBoundColumn DataField="LocationName" HeaderText="Location" EditFormColumnIndex="0" /> <telerik:GridBoundColumn DataField="PublicIPs" HeaderText="Public IPs" EditFormColumnIndex="0"/> <telerik:GridBoundColumn DataField="PrivateIPs" HeaderText="Private IPs" EditFormColumnIndex="0" /> <telerik:GridBoundColumn DataField="Address1" HeaderText="Address1" EditFormColumnIndex="1" /> <telerik:GridBoundColumn DataField="Address2" HeaderText="Address2" EditFormColumnIndex="1" /> <telerik:GridBoundColumn DataField="City" HeaderText="City" EditFormColumnIndex="2" /> <telerik:GridBoundColumn DataField="State" HeaderText="State" EditFormColumnIndex="2" /> <telerik:GridBoundColumn DataField="Zip" HeaderText="Zip" EditFormColumnIndex="2" /> <telerik:GridTemplateColumn ReadOnly="true" HeaderText="Delete" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:ImageButton ID="ibtnDelete" CommandName="Delete" runat="server" ImageUrl="images/1263447248_cross.png" /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> <EditFormSettings ColumnNumber="3" CaptionFormatString="Edit details for Notification {0}" CaptionDataField="LocationName"> <FormTableItemStyle Wrap="False"></FormTableItemStyle> <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="5" Width="200" /> <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="5" CssClass="module" Height="110px" Width="100%"></FormTableStyle> <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle> </EditFormSettings> </MasterTableView> </telerik:RadGrid>Protected Sub rgLocations_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Dim ClientID As String = Session("ClientID") Dim oCLientLocations As clsClientLocations = New clsClientLocations(ClientID) rgLocations.DataSource = oCLientLocations.DataTableEnd SubProtected Sub rgLocations_InsertCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Dim editedItem As GridEditFormItem = CType(e.Item, GridEditableItem) Dim LocationName As String = CType(editedItem("LocationName").FindControl(0), TextBox).TextEnd Subprotected void policeGrid_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == "Select") { var stationId = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["station_id"]; Session["station_id"] = stationId; radAjaxMgr.ResponseScripts.Add("radopen('information.aspx','null')"); } }<telerik:RadWindowManager ID="rw" runat="server" ReloadOnShow="True"></telerik:RadWindowManager> <telerik:RadGrid ID="policeGrid" runat="server" AllowSorting="false" Skin="Default" OnNeedDataSource="LoadPoliceTable" OnItemCommand="policeGrid_ItemCommand" GridLines="Both" AutoGenerateColumns="False" ShowFooter="false" AllowPaging="true" AllowFilteringByColumn="true" PageSize="25" PagerStyle-AlwaysVisible="true" OnUpdateCommand="policeGrid_UpdateCommand" OnInsertCommand="policeGrid_InsertCommand" EnableLinqExpressions="false" OnDeleteCommand="policeGrid_DeleteCommand" GroupingEnabled="True" ShowGroupPanel="True" GroupPanel-Enabled="True"> <ClientSettings AllowDragToGroup="True"/> <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" /> <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top" DataKeyNames="station_id" NoMasterRecordsText="No current police." TableLayout="Fixed" CommandItemSettings-ShowRefreshButton="False"> <RowIndicatorColumn Visible="False"> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <Columns> <telerik:GridEditCommandColumn UniqueName="btnEdit" ButtonType="ImageButton" EditText="Edit" Resizable="False" > <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> <HeaderStyle Width="15px" /> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn UniqueName="infoPolice" ButtonType="ImageButton" ImageUrl="../../RadControls/Grid/Skins/info.png" CommandName="Select" Text="Info"> <HeaderStyle Width="15px" /> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="STATION_ID" HeaderText="STATION_ID" UniqueName="STATION_ID" AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" > <HeaderStyle Width="50px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PRIMARY_CONTACT_ID" HeaderText="PRIMARY_CONTACT_ID" UniqueName="PRIMARY_CONTACT_ID" AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" > <HeaderStyle Width="50px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="STATE_NAME" HeaderText="STATE_NAME" UniqueName="STATE_NAME" AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" > <HeaderStyle Width="75px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="TROOP" UniqueName="TROOP" HeaderText="TROOP" AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> <HeaderStyle Width="75" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PH_HAZMAT" HeaderText="PH_HAZMAT" UniqueName="PH_HAZMAT" AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> <HeaderStyle Width="75px" /> </telerik:GridBoundColumn> <telerik:GridButtonColumn ConfirmText="Delete this group?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumngroups" Visible="true"> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> <HeaderStyle Width="50px" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings UserControlName="EditPolice.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> </MasterTableView> </telerik:RadGrid>