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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cell editing in GDBG

Thread ID:





16865 Jul 26,2004 02:26 PM UTC Oct 25,2005 03:10 PM UTC WinForms 3
Tags: GridControl
Gil Kalo
Asked On July 26, 2004 02:26 PM UTC

Hi, I need the following behavior when editing a cell: 1. When clicking on a cell (single click and hold), I want the cell to become editable. Currently, the cell become editable only when I''m pressing F2 or when I simply try to type in the cell. Any way to cause it become editable when clicking with a mouse? 2. When I exit a cell, I want to detect if the cell content has been changed. I tried to call few properties, but it didn''t work. What is the correct why to detect cell changes? 3. How can I cancel cell changes (it''s actually undo)? I have a logical condition, and if the condition is failed, I want to undo the changes, restore the old value, and exit the edit mode for the current cell? How can I do it? (I tried to call "CancelEdit", "RejectChanges", but none of these has worked?!) Thanks in advance, Gil K

Administrator [Syncfusion]
Replied On July 26, 2004 03:17 PM UTC

1) Try this setting: this.gridControl1.ActivateCurrentCellBehavior = Syncfusion.Windows.Forms.Grid.GridCellActivateAction.ClickOnCell; 2) Normally, you would use the CurrentCellValidating event to validate changes in a cell. It is only raised if the cell has changed. 3) If you set e.Cancel = true in CurrentCellValidating, the grid will not let your user leave the cell. To get the new value in CurrentCellValidating to test, you can use grid.CurrentCell.Renderer.ControlText.

Administrator [Syncfusion]
Replied On October 25, 2005 03:05 PM UTC

Is there the same kind of think for the GGC ? In fact I need to make the content of a cell editable and keep the rest of the row not editable. Thanks in advance.

Administrator [Syncfusion]
Replied On October 25, 2005 03:10 PM UTC

If you never want the other cells to get focus, you can try setting grid.TableDescriptor.Columns["ColName"].Appearance.AnyRecordFieldCell.Enabled = false; for all those columns. This should not let your user click any of these cells.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon