GridView 的编辑问题!急!!!
下面是我的前台页面和后台代码
<asp:GridView ID= "gvwShowHandbook " runat= "server " Width= "100% " AllowPaging= "True " PageSize= "15 " AutoGenerateColumns= "False ">
<RowStyle Font-Size= "12px " />
<SelectedRowStyle BackColor= "#FFFFC0 " />
<HeaderStyle BackColor= "#DBEBFE " Font-Size= "14px " />
<Columns>
<asp:BoundField DataField= "BookID " HeaderText= "编号 " ReadOnly= "True " SortExpression= "BookID " >
<HeaderStyle Font-Size= "14px " />
</asp:BoundField>
<asp:BoundField DataField= "HandBookName " HeaderText= "手册名称 " SortExpression= "HandBookName " />
<asp:BoundField DataField= "TempletName " HeaderText= "模板名称 " SortExpression= "TempletName " />
<asp:BoundField DataField= "UpdateTime " HeaderText= "更新时间 " ReadOnly= "True " SortExpression= "UpdateTime " />
<asp:CommandField ShowEditButton= "True "/>
<asp:CommandField ShowDeleteButton= "True " />
</Columns>
</asp:GridView>
后台:
protected void gvwShowHandbook_RowEditing(object sender, GridViewEditEventArgs e)
{
gvwShowHandbook.EditIndex = e.NewEditIndex;
//当前编辑行背景色高亮
this.gvwShowHandbook.EditRowStyle.BackColor = &nbs