前台代码:
<asp:Label id="Message" runat="server"></asp:Label><BR>
<asp:datagrid id="BigClassList" Width="100%" CellPadding="3" Runat="server" DataKeyField="BigClassID" OnUpdateCommand="MyDataGrid_Update" OnCancelCommand="MyDataGrid_Cancel" OnEditCommand="MyDataGrid_Edit" OnDeleteCommand="MyDataGrid_Del" OnSortCommand="MyDataGrid_Sort" OnItemCreated="MyDataGrid_ItemCreated" AutoGenerateColumns="False" AllowSorting="True">
<HeaderStyle Font-Bold="True" BackColor="Gainsboro"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="BigClassID" ReadOnly="True" HeaderText="大类编号" SortExpression="BigClassID"></asp:BoundColumn>
<asp:BoundColumn DataField="BigClassName" HeaderText="大类名称" SortExpression="BigClassName"></asp:BoundColumn>
<asp:BoundColumn DataField="BigClassSortID" HeaderText="排序编号" SortExpression="BigClassSortID"></asp:BoundColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" CancelText="返回" EditText="编辑"></asp:EditCommandColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton id="cmdDel" runat="server" Text="删除" CommandName="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
<table height="23" cellSpacing="0" cellPadding="3" width="100%" boder="0">
<tr>
<td bgColor="#efefef">添加新大类</td>
</tr>
&nb