AD
Administrator
Syncfusion Team
August 12, 2005 09:52 AM UTC
You can handle the QueryCellStyleInfo event. In your handler, you can have code like:
if(e.TableCellIdentity.TableCellType == GridTableCellType.RecordRowHeaderCell
|| e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordRowHeaderCell)
{
e.Style.CellType = "Header";
e.Style.Text = "ABC";
}
To see the Gridrecord you are working with, you can use code like:
GridRecordRow recRow = e.TableCellIdentity.DisplayElement as GridRecordRow;
Console.WriteLine(recRow.ParentRecord);
AD
Administrator
Syncfusion Team
August 12, 2005 11:19 AM UTC
Thanks, that''s working. But I don''t want the
text like this:
A
B
C
It should be as:
ABC
How can I set this, or this not possible for a RowHeader??
Kind regards
Franz
>You can handle the QueryCellStyleInfo event. In your handler, you can have code like:
>
>if(e.TableCellIdentity.TableCellType == GridTableCellType.RecordRowHeaderCell
> || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordRowHeaderCell)
>{
> e.Style.CellType = "Header";
> e.Style.Text = "ABC";
>}
>
>
>To see the Gridrecord you are working with, you can use code like:
>
>GridRecordRow recRow = e.TableCellIdentity.DisplayElement as GridRecordRow;
>Console.WriteLine(recRow.ParentRecord);
>
AD
Administrator
Syncfusion Team
August 12, 2005 11:34 AM UTC
You will have ot make the row header wider. Say, in Form.Lord, set
this.gridGroupingControl1.TableOptions.RowHeaderWidth = 100;
AD
Administrator
Syncfusion Team
August 12, 2005 01:08 PM UTC
Hmm - ok that works, but why can''t I resize the rowheader with my mouse (like other cells).
And the gridGroupingControl.TableControl.Model.ColWidths.ResizeToFit(GridRangeInfo.Table());
doesn''t have any affect on the rowheader too?
Regards
Franz
>You will have ot make the row header wider. Say, in Form.Lord, set
>
>this.gridGroupingControl1.TableOptions.RowHeaderWidth = 100;
>
AD
Administrator
Syncfusion Team
August 12, 2005 01:44 PM UTC
The row header width property is different from the other column widths which are maintained through the GridColumnDescriptor.Width property, one for each column in the TableDescriptor.Columns collection. The row header does not have such as object associated with it, and its width is just a property of the TableModel.
We will add a feature request to enable sizing the rowheader width through the UI.
http://www.syncfusion.com/support/features/grid/Default.aspx?ToDo=view&questId=351