473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to delete the row from grid view using command field

i have created the code like this
<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.
Nov 6 '08 #1
1 3996
kenobewan
4,871 Expert 4TB
You need a sqldatasource with a delete command.
Nov 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: mosscliffe | last post by:
Dear All, I am still finding my way around Visual Web Developer, but I have hit a problem. I would like to either use a multiline gridview or a less detailed, but multi record detail view,...
1
by: puja | last post by:
hi all, am using grid view in asp.net 2.0 . My problem is easy but can't get it to work. My grid view id = grdContract and am binding grid view using dataset My dataset returns 5 columns from...
1
by: jeganwaran | last post by:
retrieve cell values from the grid view using code
2
by: rameshgohil | last post by:
I am using grid view and a button column in it using <itemTemplate> but I am not able to rerive cell value of a selected row from grid view. I have tried the following to methods in Row_command...
1
by: vibhashin | last post by:
I hve extracted a coloumn in combo box from database. I want that when i select a particular value from the combo box it should display the related details of the selected value in the combo box in...
2
by: mcaamit | last post by:
I want to update a row in grid view using Bound column my code is like this :::But it does`nt work int iRowIndex = e.RowIndex; string sOrderNo = GridView1.Rows.Cells.Text; ...
1
by: 111111222222 | last post by:
Hi All, As of now I am populating grid view using code behind. I want to place a textbox and a button to search the grid view using TIN which is one column in my grid view. I placed the textbox...
3
by: amitjain123 | last post by:
Hi All, I need one solution. I have list box and grid view on screen. I want to add selected item of list box into grid view as row. Using javascript. Can we do this? Is any alternative...
0
by: brat33 | last post by:
I have lots of files that need monthly cleanup done on them. These files are located in many different directories on the same server. Some example files names are C1234.idx, C1111.idx, C8693.idx,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.