how to delete the row from grid view using command field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hello12356789
    New Member
    • Nov 2008
    • 5

    how to delete the row from grid view using command field

    i have created the code like this
    <asp:GridView ID="grd" runat="server" AutoGenerateCol umns="False"
    onselectedindex changed="grd_Se lectedIndexChan ged" Width="100%">
    <Columns>
    <asp:BoundFie ld DataField="ID" HeaderText="Bud get ID" />

    <asp:CommandFie ld HeaderText="Del ete" ShowDeleteButto n="True" />
    </Columns>
    </asp:GridView>

    a show delete field will appeat at run time.
    i want to delete the row from the gridview.can anybody tell me how to do it?when i will click on the delete field at the execution time.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    You need a sqldatasource with a delete command.

    Comment

    Working...