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.
Syncfusion Feedback

gridgroupingcontrol: Cell Selection depending on being readonly or not

Thread ID:

Created:

Updated:

Platform:

Replies:

26239 Mar 17,2005 08:46 AM Mar 18,2005 10:53 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 17, 2005 08:46 AM

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 09:21 AM

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

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; } }

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

;