我怎麼能在我的datagridview刪除整行。我已經有一個刪除鏈接在我的DataGrid .. 這裏是VB如何刪除我的SQL數據視圖中的整行?
<asp:GridView ID="EmployeeHallway" runat="server" AutoGenerateColumns="False" AutoGenerateDeleteButton="False" AutoGenerateSelectButton="True" Height="93px" HorizontalAlign="Center" PageSize="6" style="margin-bottom: 0px; text-align: center;" Width="768px">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<%--ADD THE DELETE LINK BUTTON--%>
<asp:LinkButton ID="LinkButton2" Runat="server" OnClientClick ="return confirm('Are you sure you?');"
CommandName="Delete">Delete</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="EmployeeID" HeaderText="Locker ID" />
<asp:BoundField DataField="Name" HeaderText="Name" />
<asp:BoundField DataField="EmployeeNo" HeaderText="EmployeeNo" />
<asp:BoundField DataField="Email" HeaderText="Email" />
<asp:BoundField DataField="Location" HeaderText="Location" />
</Columns>
<HeaderStyle BackColor="#003366" BorderColor="#336699" BorderStyle="Solid" ForeColor="White" />
<PagerStyle BackColor="#003366" BorderColor="#336699" ForeColor="White" />
<RowStyle BackColor="White" ForeColor="#003366" />
<SelectedRowStyle BackColor="White" ForeColor="#6600FF" />
<SortedAscendingCellStyle BackColor="#CCCCCC" />
</asp:GridView>
我的標記代碼,當我點擊刪除鏈接此錯誤顯示
「的GridView的 'EmployeeHallway' 解僱事件RowDeleting這是不處理的。」
誰能幫助我該怎麼請做下一步
[GridView'PendingRecordsGridview'觸發的事件RowDeleting沒有被處理]的可能的重複(http://stackoverflow.com/questions/14301815/the-gridview-pendingrecordsgridview-fired-event-rowdeleting-which-wasnt -handl) – 2014-11-03 05:07:46