| | |
deleting values from the gridview
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 23
Reputation:
Solved Threads: 0
i have created the code like this
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.
asp.net Syntax (Toggle Plain Text)
<asp:GridView ID="grd" runat="server" AutoGenerateColumns="False" onselectedindexchanged="grd_SelectedIndexChanged" Width="100%"> <Columns> <asp:BoundField DataField="ID" HeaderText="Budget ID" /> <asp:CommandField HeaderText="Delete" ShowDeleteButton="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.
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.
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 138
why not just delete the row from your datasource and reload the grid?
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
•
•
i have created the code like this
asp.net Syntax (Toggle Plain Text)
<asp:GridView ID="grd" runat="server" AutoGenerateColumns="False" onselectedindexchanged="grd_SelectedIndexChanged" Width="100%"> <Columns> <asp:BoundField DataField="ID" HeaderText="Budget ID" /> <asp:CommandField HeaderText="Delete" ShowDeleteButton="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.
•
•
Join Date: Dec 2009
Posts: 1
Reputation:
Solved Threads: 0
0
#4 19 Days Ago
HI...
It will work do like this.. ...
<Columns>
</asp:TemplateField>
<asp:CommandField
ButtonType = "Button"
ShowEditButton = "True" CausesValidation="false"
ShowDeleteButton = "True" HeaderText="Edit Controls"
/>
</Columns>
</asp:GridView>
<asp
qlDataSource ID="SqlDailyDatasource" runat="server"
ConnectionString="<%$ ConnectionStrings:ChdbConnectionString %>"
SelectCommand="Select * from Daily"
DeleteCommand="Delete from Daily where ItemsNo=@ItemsNo"
</asp
qlDataSource>
It will work do like this.. ...
<Columns>
</asp:TemplateField>
<asp:CommandField
ButtonType = "Button"
ShowEditButton = "True" CausesValidation="false"
ShowDeleteButton = "True" HeaderText="Edit Controls"
/>
</Columns>
</asp:GridView>
<asp
qlDataSource ID="SqlDailyDatasource" runat="server" ConnectionString="<%$ ConnectionStrings:ChdbConnectionString %>"
SelectCommand="Select * from Daily"
DeleteCommand="Delete from Daily where ItemsNo=@ItemsNo"
</asp
qlDataSource> ![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Problem with Insert
- Next Thread: insertion of code using inner html
Views: 1229 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 activexcontrol advice ajax alltypeofvideos anathor application asp asp.net bc30451 bottomasp.net box browser button c# checkbox click commonfunctions complex connection dataaccesslayer database datagridview datagridviewcheckbox datalist development dgv dropdownlist dynamically edit editing expose feedback fileuploader fill flash form formatdecimal formview google gridview gudi iframe iis javascript list listbox login microsoft migration mono mouse mssql news numerical opera panelmasterpagebuttoncontrols parent problem project radio redirect registration relationaldatabases reportemail richtextbox rows save schoolproject search security select session silverlight smartcard smoobjects software sql sql-server sqlserver2005 suse textbox theft tracking unauthorized validation vb.net video videos view vista visualstudio web webapplications webdevelopemnt webprogramming webservice xsl youareanotmemberofthedebuggerusers






