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?)
SIGN IN To post a reply.
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 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 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;
}
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
IK Igor Kashtelyan
- Jul 27, 2005 03:11 PM UTC
- Jul 27, 2005 06:30 PM UTC