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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

gridgroupingcontrol: Cell Selection depending on being readonly or not

Thread ID:





26239 Mar 17,2005 01:46 PM UTC Mar 18,2005 03:53 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On March 17, 2005 01:46 PM UTC

Hi, if you click on a cell in a GridGroupingControl is it possible to not show the blinking cursor in a readonly cell ? Thanks, Oliver

Administrator [Syncfusion]
Replied On March 17, 2005 02:21 PM UTC

If it is a readonly textbox cell, in addition to setting StyleInfo.ReadOnly = true, also set StyleInfo.CellType = "Static". If it is not a textbox, then you can try handling the TableControlCurrentCellStartEditing. So, if you have set something like, this.gridGroupingControl1.TableDescriptor.Columns["region"].Appearance.AnyRecordFieldCell.ReadOnly = true; to make the cell readonly, you can use this handler to prevent teh edit cursor from showing. private void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e) { GridCurrentCell cc = e.TableControl.CurrentCell; int field = e.TableControl.TableDescriptor.ColIndexToField(cc.ColIndex); GridTableCellStyleInfo style = e.TableControl.TableDescriptor.Columns[field].Appearance.AnyRecordFieldCell; if(style.ReadOnly) { e.Inner.Cancel = true; } }

Administrator [Syncfusion]
Replied On March 18, 2005 03:53 PM UTC

Hi, i found another way. Haven''t set the Tabledescriptor. The following worked for me : private void m_syncGrid_TableControlCurrentCellStartEditing(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e) { Syncfusion.Windows.Forms.Grid.GridCurrentCell cc = e.TableControl.CurrentCell; int field = e.TableControl.TableDescriptor.ColIndexToField(cc.ColIndex); Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor style = e.TableControl.TableDescriptor.Columns[field]; if(style.ReadOnly) { e.Inner.Cancel = true; } }


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