<telerik:RadGrid runat="server" ID="rgBooks" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" onpageindexchanged="rgBooks_PageIndexChanged" onpagesizechanged="rgBooks_PageSizeChanged" CellSpacing="0" GridLines="None" oneditcommand="rgBooks_EditCommand" ongroupschanging="rgBooks_GroupsChanging" onsortcommand="rgBooks_SortCommand" ShowGroupPanel="True" oncancelcommand="rgBooks_CancelCommand" onitemupdated="rgBooks_ItemUpdated" onupdatecommand="rgBooks_UpdateCommand" ondeletecommand="rgBooks_DeleteCommand" oninsertcommand="rgBooks_InsertCommand" onitemcommand="rgBooks_ItemCommand" AllowFilteringByColumn="True" > <ClientSettings AllowDragToGroup="True"> <Selecting CellSelectionMode="None"></Selecting> </ClientSettings> <MasterTableView CommandItemDisplay="Bottom" AllowFilteringByColumn="true"> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"/> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"/> <Columns> <telerik:GridTemplateColumn HeaderText="Book ID" DataField="BookID" UniqueName="BookID" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="true" DataType="System.Int32" > <ItemTemplate> <asp:Label ID="lblBookID" runat="server" Text='<%#Eval("BookID") %>' /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Title" UniqueName="Title"> <ItemTemplate> <asp:Label ID="lblTitle" runat="server" Text='<%#Eval("Title") %>' /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtTitle" runat="server" Text='<%#Eval("Title") %>' /> <asp:RequiredFieldValidator ID="rfvTitle" runat="server" ForeColor="Red" ErrorMessage="Please Enter the Title" ControlToValidate="txtTitle"/> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Publisher Name" UniqueName="PublisherName" > <ItemTemplate> <asp:Label ID="lblPublisherName" runat="server" Text='<%#Eval("PublisherName") %>' /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtPublisherName" runat="server" Text='<%#Eval("PublisherName") %>' /> <asp:RequiredFieldValidator ID="rfvPublisherName" runat="server" ForeColor="Red" ErrorMessage="Please Enter the Publisher Name" ControlToValidate="txtPublisherName"/> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Published Date" UniqueName="PublishedDate"> <ItemTemplate> <asp:Label ID="lblPublishedDate" runat="server" Text='<%#Eval("PublishedDate") %>' /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtPublishedDate" runat="server" Text='<%#Eval("PublishedDate") %>' onKeyPress='Javascript:return false;'/> <cc1:CalendarExtender ID="cePublishedDate" TargetControlID="txtPublishedDate" runat="server"/> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderText="Edit" ButtonType="ImageButton"/> <telerik:GridButtonColumn ConfirmText="Are You Sure Want To Delete?" ConfirmDialogType="Classic" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteRow" HeaderText="Delete" CommandArgument="BookID"> <ItemStyle HorizontalAlign="Center" /> </telerik:GridButtonColumn> </Columns> <CommandItemSettings AddNewRecordText="Add New" ShowRefreshButton="true" RefreshText="Refresh" /> <CommandItemStyle Height="30px" /> <EditFormSettings> <EditColumn UniqueName="EditCommand" /> </EditFormSettings> </MasterTableView> <FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)