We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

cell changed in datagrid

Thread ID:

Created:

Updated:

Platform:

Replies:

4767 May 30,2003 01:50 AM Jun 9,2003 08:58 AM Windows Forms 4
loading
Tags: FAQ
paola
Asked On May 30, 2003 01:50 AM

Hi all. I've to retrive if a value in a cell is changed. How can I do it? Thanks a lot Paola

mike
Replied On June 2, 2003 05:53 PM

> Hi all. > > I've to retrive if a value in a cell is changed. > > How can I do it? > > Thanks a lot > > Paola > >

mike
Replied On June 2, 2003 05:59 PM

Sorry for the earlier blank reply. Basically, you just check the datasource for changes. You need to move the currentcell or the cell you were editing last won't get caught. 'Move the current cell to to the top left Datagrid1.CurrentCell = New DataGridCell(0, 0) 'check to see if the dataset has changed If DataSet1.HasChanges Then MessageBox.Show("There are changes in the datagrid") End If > Hi all. > > I've to retrive if a value in a cell is changed. > > How can I do it? > > Thanks a lot > > Paola > >

paola
Replied On June 6, 2003 06:27 AM

Thanks Mike, it works fine. Move the cell modified to current I'm be able to change its backcolor, but I've another problem... Can I prevent the click event on a cell? Unfortunately when a user click on a cell it becames the current cell and so its backcolor changes.... I would change the backcolor only of the cell in which tha data change. Can you help me? Thanks a lot. Paola > Sorry for the earlier blank reply. > > Basically, you just check the datasource for changes. You need to move the currentcell or the cell you were editing last won't get caught. > > > 'Move the current cell to to the top left > Datagrid1.CurrentCell = New DataGridCell(0, 0) > 'check to see if the dataset has changed > If DataSet1.HasChanges Then > MessageBox.Show("There are changes in the datagrid") > End If > > > Hi all. > > > > I've to retrive if a value in a cell is changed. > > > > How can I do it? > > > > Thanks a lot > > > > Paola > > > > >

mike
Replied On June 9, 2003 08:58 AM

Glad it works. You should be able to prevent the click event by overriding it without calling the base class click event handler. Or you could trap the event and move the focus to another control. > Thanks Mike, > it works fine. > Move the cell modified to current I'm be able to change its backcolor, > but I've another problem... > > Can I prevent the click event on a cell? > > Unfortunately when a user click on a cell it becames the current cell and so its backcolor changes.... I would change the backcolor only of the cell in which tha data change. > > Can you help me? > > Thanks a lot. > > Paola > > > Sorry for the earlier blank reply. > > > > Basically, you just check the datasource for changes. You need to move the currentcell or the cell you were editing last won't get caught. > > > > > > 'Move the current cell to to the top left > > Datagrid1.CurrentCell = New DataGridCell(0, 0) > > 'check to see if the dataset has changed > > If DataSet1.HasChanges Then > > MessageBox.Show("There are changes in the datagrid") > > End If > > > > > Hi all. > > > > > > I've to retrive if a value in a cell is changed. > > > > > > How can I do it? > > > > > > Thanks a lot > > > > > > Paola > > > > > > > > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;