Try this out:
1. Add this column to your datagrid:
<asp:TemplateColumn>
<HeaderTemplate>
Delete Access
</HeaderTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:imagebutton runat="server" ImageUrl="../images/delete
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateColumn>
--------------------------
2. On your datagrid properties add:
OnDeleteCommand="DataGrid_
--------------------------
3. On your source code add the following code snippet:
Where
dg = datagrid name
keyvalue = DataKeyField (from datagrid properties)
Main Topics
Browse All Topics





by: sl8rzPosted on 2008-12-10 at 11:41:37ID: 23142115
How about having a delete button near the dgv and have it delete the highlighted row or rows?