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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get the CurrentCellChanged event to fire via setting the Text property of a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

24451 Feb 4,2005 05:00 AM UTC Feb 7,2005 01:04 PM UTC WinForms 7
loading
Tags: GridControl
Nick Zdunic
Asked On February 4, 2005 05:00 AM UTC

I''m setting up some unit tests (NUnit). The unit test involves setting the values of cells programmatically. For example: Grid(1, 3).Text = "3.0" The result should be the another grid gets updated. I''m doing this is the CurrentCellChanged event. This event is not being enacted. How can I get this event to fire? Is there another way to do it?

Administrator [Syncfusion]
Replied On February 4, 2005 01:12 PM UTC

Look for a SaveCellText event or SaveCellInfo event. The CurrentCellChanged event is only fired when text in the current cell is changed, e.g. if you call grid.CurrentCell.Renderer.BeginEdit(); grid.CurrentCell.Renderer.Control = "3.0"; Stefan >I''m setting up some unit tests (NUnit). > >The unit test involves setting the values of cells programmatically. For example: > >Grid(1, 3).Text = "3.0" > >The result should be the another grid gets updated. I''m doing this is the CurrentCellChanged event. This event is not being enacted. > >How can I get this event to fire? Is there another way to do it? >

Nick Zdunic
Replied On February 6, 2005 05:06 PM UTC

How do I programmatically get the current cell to be a specific reference. For instance I want to grid cell reference (1, 3) to be set to 3.0 and therefore get the event to fire. >Look for a SaveCellText event or SaveCellInfo event. > >The CurrentCellChanged event is only fired when text in the current cell is changed, e.g. if you call > >grid.CurrentCell.Renderer.BeginEdit(); >grid.CurrentCell.Renderer.Control = "3.0"; > >Stefan > >>I''m setting up some unit tests (NUnit). >> >>The unit test involves setting the values of cells programmatically. For example: >> >>Grid(1, 3).Text = "3.0" >> >>The result should be the another grid gets updated. I''m doing this is the CurrentCellChanged event. This event is not being enacted. >> >>How can I get this event to fire? Is there another way to do it? >>

Nick Zdunic
Replied On February 6, 2005 05:11 PM UTC

Furthermore, the BeginEdit function is not present in CurrentCell in the version of the grid I''m using (2.0.5.0) The Control property is also readonly. >I''m setting up some unit tests (NUnit). > >The unit test involves setting the values of cells programmatically. For example: > >Grid(1, 3).Text = "3.0" > >The result should be the another grid gets updated. I''m doing this is the CurrentCellChanged event. This event is not being enacted. > >How can I get this event to fire? Is there another way to do it? >

Administrator [Syncfusion]
Replied On February 6, 2005 08:17 PM UTC

Hi Nick, my fault - the code lines were wrong ... WRT to moving the current cell you need to call MoveTo. This code should work: grid.CurrentCell.MoveTo(1, 3)l grid.CurrentCell.BeginEdit(); grid.CurrentCell.Renderer.ControlText = "3.0"; To commit changes to the underlying grid call grid.CurrentCell.ConfirmChanges(); Stefan >Furthermore, the BeginEdit function is not present in CurrentCell in the version of the grid I''m using (2.0.5.0) The Control property is also readonly. > >>I''m setting up some unit tests (NUnit). >> >>The unit test involves setting the values of cells programmatically. For example: >> >>Grid(1, 3).Text = "3.0" >> >>The result should be the another grid gets updated. I''m doing this is the CurrentCellChanged event. This event is not being enacted. >> >>How can I get this event to fire? Is there another way to do it? >>

Nick Zdunic
Replied On February 7, 2005 03:38 AM UTC

Yep - that works. Thanks. >Hi Nick, > >my fault - the code lines were wrong ... > >WRT to moving the current cell you need to call MoveTo. > >This code should work: > > >grid.CurrentCell.MoveTo(1, 3)l >grid.CurrentCell.BeginEdit(); >grid.CurrentCell.Renderer.ControlText = "3.0"; > > >To commit changes to the underlying grid call > >grid.CurrentCell.ConfirmChanges(); > >Stefan > >>Furthermore, the BeginEdit function is not present in CurrentCell in the version of the grid I''m using (2.0.5.0) The Control property is also readonly. >> >>>I''m setting up some unit tests (NUnit). >>> >>>The unit test involves setting the values of cells programmatically. For example: >>> >>>Grid(1, 3).Text = "3.0" >>> >>>The result should be the another grid gets updated. I''m doing this is the CurrentCellChanged event. This event is not being enacted. >>> >>>How can I get this event to fire? Is there another way to do it? >>>

Nick Zdunic
Replied On February 7, 2005 03:54 AM UTC

Hi - just another thing. How do I get this to work for a checkbox column? >Yep - that works. Thanks. > >>Hi Nick, >> >>my fault - the code lines were wrong ... >> >>WRT to moving the current cell you need to call MoveTo. >> >>This code should work: >> >> >>grid.CurrentCell.MoveTo(1, 3)l >>grid.CurrentCell.BeginEdit(); >>grid.CurrentCell.Renderer.ControlText = "3.0"; >> >> >>To commit changes to the underlying grid call >> >>grid.CurrentCell.ConfirmChanges(); >> >>Stefan >> >>>Furthermore, the BeginEdit function is not present in CurrentCell in the version of the grid I''m using (2.0.5.0) The Control property is also readonly. >>> >>>>I''m setting up some unit tests (NUnit). >>>> >>>>The unit test involves setting the values of cells programmatically. For example: >>>> >>>>Grid(1, 3).Text = "3.0" >>>> >>>>The result should be the another grid gets updated. I''m doing this is the CurrentCellChanged event. This event is not being enacted. >>>> >>>>How can I get this event to fire? Is there another way to do it? >>>>

Administrator [Syncfusion]
Replied On February 7, 2005 01:04 PM UTC

A checkbox has no active state, so there is no way to get CurrentCellChanged to be raised if you are programmatically changing the cellvale (do a CurrentCell.MovetTo and CurrentCell.BeginEdit does not work as there is no active state in a checkbox). Now your user ckecking the checkbox does raise the CurrentCellChanged event, but you programmatically changing it, does not. If you want to catch programmatic changes in a checkbox, you can use the SaveCellInfo event.

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.

Warning Icon 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.Close Icon

;