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

grouping Grid Appearance

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?)

3 Replies

AD Administrator Syncfusion Team July 27, 2005 12:30 PM

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


IK Igor Kashtelyan July 27, 2005 01: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; >


AD Administrator Syncfusion Team July 27, 2005 01: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;
}

Loader.
Live Chat Icon For mobile
Up arrow icon