473,400 Members | 2,163 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,400 software developers and data experts.

How to delete a row or datas from datagridview in vb.net?

Prathap
37
I am a beginner in vb.net, i dont know how to delete datas from datagridview in vb.net.
Nov 30 '11 #1
1 2802
pod
298 100+
  1. capture the id of the selected row of data
    (the row must contains the id in one of the cells, hidden or not)
  2. build and submit a query to delete this record
    (delete from table where id = [caopture ID])
  3. refresh the datagrid datasource
    (run the query you used to load the datagrid previously)
Nov 30 '11 #2

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

Similar topics

0
by: TNSFED | last post by:
I have a dilemma when trying to delete a row from the DataGridView. Here is a sample of my code: private void dgv_EQUPS_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e) {...
1
by: Riley | last post by:
Need some help. I am using datagridview in 2005 with C#. I am calling a web service and filling the datagridview with the data returned. This all works fine. Next step is to take a value from one...
0
by: Lawrence 007 | last post by:
Hi, This is my first big project. I have a form that is loaded with customer information. The datagrid is created with code as you can see below. I do not want the user to be able to update data...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a...
2
by: abiramii | last post by:
Hi How to Import datagridview datas to excel sheet using c#.net(win forms)
2
by: mvenkatesan | last post by:
Hi guys I am developing a project, use datagridview the datas are stored arraylist I am bind the data using datatable & databind the datagridview data displayed perfect. But i am set one...
7
by: mvenkatesan | last post by:
Hi guys I am win appl. I was bind the datagridview from datatable. i was changed datas @ runtime. datatable changed but my datagridview not refresh. I written dagaridview.refresh(); not work ...
1
by: Avedo | last post by:
Hello! I have a form application with a DataGridView, and an Save/Delete and Cancel button. When the application is opened, it is supplied an XML file that may or may not exist, and display the...
2
by: driveman | last post by:
Hello, I have existing code working perfectly, which can : -clone existing datas (title, textarea, link-to-picture) contained in xml file, and : -delete datas. I looking for a javascript code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.