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 editing in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

16865 Jul 26,2004 10:26 AM Oct 25,2005 11:10 AM Windows Forms 3
loading
Tags: GridControl
Gil Kalo
Asked On July 26, 2004 10:26 AM

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 11:17 AM

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 11:05 AM

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 11:10 AM

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.

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.

;