<asp:GridView DataKeyNames="ID" ID="Grid_Categories" runat="server" AutoGenerateColumns="False" Width="250px" onrowcancelingedit="Grid_Categories_RowCancelingEdit" onrowdeleting="Grid_Categories_RowDeleting" onrowediting="Grid_Categories_RowEditing" onrowupdating="Grid_Categories_RowUpdating" onselectedindexchanged="Grid_Categories_SelectedIndexChanged" onrowcommand="Grid_Categories_RowCommand" ShowFooter="True" onrowdatabound="Grid_Categories_RowDataBound" EmptyDataText="no valyue"> <Columns> <asp:TemplateField ItemStyle-Width="165"> <ItemTemplate> <asp:LinkButton runat="server" ID="link_category" Text='<%# Eval("Category") %>' CommandName="Select" CausesValidation="true"></asp:LinkButton> </ItemTemplate> <EditItemTemplate> <asp:TextBox runat="server" ID="txtcategory" Text='<%# Eval("Category") %>'></asp:TextBox> </EditItemTemplate> <FooterTemplate> Name <asp:TextBox runat="server" ID="txtnewcategory"></asp:TextBox> </FooterTemplate> <ItemStyle Width="165px"></ItemStyle> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:LinkButton runat="server" ID="link_Edit" Text="Edit" CommandName="Edit" CausesValidation="true"></asp:LinkButton> <asp:LinkButton runat="server" ID="link_Delete" Text="Delete" CommandName="Delete" CausesValidation="true"></asp:LinkButton> </ItemTemplate><pre lang="c#"> <EditItemTemplate> <asp:LinkButton runat="server" ID="link_Update" Text="Update" CommandName="Update" CausesValidation="true"></asp:LinkButton> <asp:LinkButton runat="server" ID="link_Cancel" Text="Cancel" CommandName="Cancel" CausesValidation="true"></asp:LinkButton> </EditItemTemplate> <FooterTemplate> <asp:Button runat="server" ID="btn_insert1" Text="Insert" CommandName="Insert" CausesValidation="true" /> </FooterTemplate> </asp:TemplateField> </Columns> </asp:GridView>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)