473,385 Members | 1,483 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,385 software developers and data experts.

Delete row from grid

I have a datagrid. Through the normal means I highlight a record in the
datagrid and press the delete key. I say yes and the record is deleted.
However, in this case I need to run some code after deleting the record that
scans the table and puts values in a BalDue field. The code is in a sub
routine called CalcBal().

How is it possible for me to run this code after deleting a record in a
grid? In what event could I place a call to CalcBal that would cause it to
run after deleting a record?

Nov 20 '05 #1
1 1227
Hi Woody,

You can handle the DataTable.RowDeleted Event and add CalcBal() call in it.
The RowDeleted event occurrs after a Row is deleted. You can refer to the
following link for more information.

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdatadatatableclassrowdeletedtopic.asp

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

--------------------
| From: "Woody Splawn" <wo***@splawns.com>
| Subject: Delete row from grid
| Date: Tue, 4 Nov 2003 11:56:53 -0800
| Lines: 12
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <u3**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 168.158-60-66-fuji-dsl.static.surewest.net
66.60.158.168
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:153613
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| I have a datagrid. Through the normal means I highlight a record in the
| datagrid and press the delete key. I say yes and the record is deleted.
| However, in this case I need to run some code after deleting the record
that
| scans the table and puts values in a BalDue field. The code is in a sub
| routine called CalcBal().
|
| How is it possible for me to run this code after deleting a record in a
| grid? In what event could I place a call to CalcBal that would cause it
to
| run after deleting a record?
|
|
|
|

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike | last post by:
I'm having a problem with the grid not getting refreshed after deleting a record. Even though the record is deleted from the table. I have the following code in a Delete button event: sql =...
4
by: Stephen | last post by:
I have got an event below to remove items from an arraylist and then to rebind the arraylist to the datagrid subsequently deleting the appropriate row. My problem is that my code makes sense and I...
1
by: bie2 | last post by:
Hi, I have a datagrid with many records, I want to delete all of them. I'm doing CTRL-A and press delete...I take a long time to delete it and the UI is froze during that time. So I would...
1
by: J | last post by:
Hi, Can someone please help with a problem I have. The BOL I think are useless in explaining what I want to do. I have a datagrid, that is bound to a dataview. I have a checkbox as a...
3
by: vcornjamb | last post by:
Hello, I am developing a web form that contains some buttons and a data grid which has as its last column link buttons that will delete the data associated with that row. Everything works fine,...
3
by: dmalhotr2001 | last post by:
Hi, I have a datagrid hypothetically with this data: id | text | link ------------------------------- 1 | first row | delete button 2 | second row | delete button ...
2
by: Rodrigo Ferreira | last post by:
Hi How can i delete a row from a datagrid with code? I want the same efectt that when i click in delete key. Greetings
1
by: 67237 | last post by:
i just want to know how to delete a row from a grid view since the data is been retrieved as the data table to the grid view so by clicking delete button the row should delete please do help me to...
11
by: dongarbage | last post by:
I'm building an application (WPF) and I have a Panel in the application which will be populated dynamically with objects of the type Grid, TextBox, etc. For simplicity, let's say I'm just adding...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.