deleting values from the gridview

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 23
Reputation: kapil.tandon is an unknown quantity at this point 
Solved Threads: 0
kapil.tandon kapil.tandon is offline Offline
Newbie Poster

deleting values from the gridview

 
0
  #1
Nov 6th, 2008
i have created the code like this
  1. <asp:GridView ID="grd" runat="server" AutoGenerateColumns="False"
  2. onselectedindexchanged="grd_SelectedIndexChanged" Width="100%">
  3. <Columns>
  4. <asp:BoundField DataField="ID" HeaderText="Budget ID" />
  5.  
  6. <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" />
  7. </Columns>
  8. </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.
Last edited by peter_budo; Nov 7th, 2008 at 4:08 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,160
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: deleting values from the gridview

 
0
  #2
Nov 7th, 2008
why not just delete the row from your datasource and reload the grid?
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 645
Reputation: binoj_daniel is an unknown quantity at this point 
Solved Threads: 17
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: deleting values from the gridview

 
0
  #3
Nov 11th, 2008
Originally Posted by kapil.tandon View Post
i have created the code like this
  1. <asp:GridView ID="grd" runat="server" AutoGenerateColumns="False"
  2. onselectedindexchanged="grd_SelectedIndexChanged" Width="100%">
  3. <Columns>
  4. <asp:BoundField DataField="ID" HeaderText="Budget ID" />
  5.  
  6. <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" />
  7. </Columns>
  8. </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.
Do you only want to delete the row from the GridView and not from the DataBase?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC