Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Datagrid : how to detect row changes

Posted on 2003-10-23
4
305 Views
Last Modified: 2013-12-26
Hi,

How do I trigger the row changes event on a datagrid ? for a column change, I could use :

* Datagrid1_AfterColUpdate and
* Datagrid1_BeforeColUpdate

if I want to add any coding in it. However, I don't know what should I use in order to put any coding before the row actually changes. So, how to detect row changes on a datagrid ? Is there any VB method out there that are already available but I do not know of ?

Please advise.

Thanks
0
Comment
Question by:terrible1000
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 125 total points
ID: 9605894
Use a event call :RowColChange
0
 

Author Comment

by:terrible1000
ID: 9611791
Hi,

I have tried that, but the coding I put inside that event call was not executed when I change to a new row. How to deal with that ? I want to prompt a message box ("update row ?") which ask user whether he/she would like to add the row he/she has just entered. But clicking the row below the one the user is entering didn't prompt up the code I put in the rowcolchange event call ?

Any other ideas ?

Thanks
0
 

Author Comment

by:terrible1000
ID: 9612057
Hi,

Got it working now.

Thanks
0
 

Expert Comment

by:acible
ID: 11996729
'try

Datagrid1__CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdFinance.CurrentCellChanged

It's work for me.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question