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

GDBG - read only cell.

Thread ID:





14661 Jun 2,2004 05:25 AM UTC Jun 2,2004 09:13 AM UTC WinForms 1
Tags: GridControl
Alex Zhaleiko
Asked On June 2, 2004 05:25 AM UTC

Hi, can anybody help me with following problem. In GDBG when i click on the cell with mouse, i''m immediately entering into edit mode. How can i change behaviour of the grid to following: 1. When user first click on cell - just select the cell. 2. When user click on the selected cell - then enter to edit mode. Thank you.

Administrator [Syncfusion]
Replied On June 2, 2004 09:13 AM UTC

The grid.ActivateCurrentCellBehavior property is what controls this cell editing activation. The default is to activate it when you click on a cell which is what you are seeing now. If you set it to None or set it to DblClkOnCell, then single clicking the cell will not activate it. To get it to activate on the second single click of the same cell, I think you will have to handle some events and sets some flags to try to isolate this seconde click. Here are some snippets that seem to work for me.
int lastCurrentCellRowIndex = -1;
int lastCurrentCellColIndex = -1;

private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
	if(Control.MouseButtons != MouseButtons.Left)
		GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
		this.lastCurrentCellRowIndex = cc.MoveToRowIndex;
		this.lastCurrentCellColIndex = cc.MoveFromColIndex;

private void gridDataBoundGrid1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	if(lastCurrentCellRowIndex  == cc.RowIndex && lastCurrentCellColIndex == cc.ColIndex)
		this.gridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.ClickOnCell;
		this.gridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.None;
	this.lastCurrentCellRowIndex = cc.RowIndex;
	this.lastCurrentCellColIndex = cc.ColIndex;


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