单击一个按钮,我正在显示这个gridview
,问题是当我输入时
Enter
当gridview处于编辑模式时,它正在更新gridview的第一行..我知道
如何禁用整个页面的输入,但不知道如何为image button
.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="st_id" OnRowEditing="EditRecord"
OnRowCancelingEdit="CancelRecord" OnRowUpdating="UpdateRecord"
CellPadding="4" EnableModelValidation="True" ForeColor="Black"
GridLines="Vertical" BackColor="White" BorderColor="#DEDFDE"
BorderStyle="None" BorderWidth="1px">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:CommandField EditImageUrl="~/Styles/image/Icon-edit-22x22.png" ShowEditButton="true"
ButtonType="Image" CancelImageUrl="~/Styles/image/cancel.png"
UpdateImageUrl="~/Styles/image/update.png" CausesValidation="true" ValidationGroup="bottom" />
------