I am displaying a table in a grid view in a asp.net webpage. I want the user to select one row in the website and delete it. How can I do that. I have a delete button in the same page, where I will do code behind to drop the row in the database. But my problem is how can user select one row in the table .
<asp:GridView ID="GridView1" runat="server" CssClass="style29">
<Columns>
<asp:TemplateField HeaderText="Send Message to Group">
<ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server"
PostBackUrl='<%# Eval("GroupName", "SendMessage.aspx?GroupName={0}") %>'
Text='Send Message'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Is it possible to do without a check box? Or can I add a delete image to the table in a separate column and on clicking the button the row will be deleted.
You should add:
on your gridview.