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.

grouping Grid Appearance

Thread ID:

Created:

Updated:

Platform:

Replies:

32340 Jul 27,2005 11:11 AM Jul 27,2005 02:30 PM Windows Forms 3
loading
Tags: GridControl
Igor Kashtelyan
Asked On July 27, 2005 11:11 AM

hello, I am using a grouping grid among several others in my app. I am trying finding properties to manage the grid''s appearance, but with not much success. Could you please advise on following: 1. - prevent a user from resizing columns in the grouping grid control (is there a property so I could define?) 2. - prevent user from sorting by clicking on a column''s header(I guess a property again?)

Administrator [Syncfusion]
Replied On July 27, 2005 01:30 PM

Try these 2 properties. this.gridGroupingControl1.TableOptions.AllowSortColumns = false; this.gridGroupingControl1.TableModel.Options.ResizeColsBehavior = GridResizeCellsBehavior.None;

Igor Kashtelyan
Replied On July 27, 2005 02:25 PM

Thanks Clay, hm-m-m-m... it''s you who answers all the time, makes me wandering if this is "one man show"... All right, this is just to relax (mostly for myself...) We are running 2.0.5.1 (I guess we should be upgrading awhile ago...). While your latter advise resolved a problem of preventing a user from resizing columns, the former (sorting) would not work since there is no such property in TableOptions (at least no in 2.0.5.1). I would really appreciate if you could help me with the sorting problem...Could it be that this property not in TableOptions, but somewhere else?... Tnx. >Try these 2 properties. > >this.gridGroupingControl1.TableOptions.AllowSortColumns = false; > >this.gridGroupingControl1.TableModel.Options.ResizeColsBehavior = GridResizeCellsBehavior.None; >

Administrator [Syncfusion]
Replied On July 27, 2005 02:30 PM

Unless you upgrade, you will have to handle some click event to prevent this. You can try handling the TableModel.CellClick event and cancelling it if you are on a header cell.
this.gridGroupingControl1.TableControl.CellClick += new GridCellClickEventHandler(TableControl_CellClick);

private void TableControl_CellClick(object sender, GridCellClickEventArgs e)
{
	GridTableCellStyleInfo style = this.gridGroupingControl1.TableModel[e.RowIndex, e.ColIndex] as GridTableCellStyleInfo;
	if(style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell)
		e.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.

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.

;