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
close icon

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 05:30 PM UTC

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

IK Igor Kashtelyan July 27, 2005 06:25 PM UTC

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 (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 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 06:30 PM UTC

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;

Live Chat Icon For mobile
Up arrow icon