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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl and RowHeader text

Thread ID:

Created:

Updated:

Platform:

Replies:

33082 Aug 12,2005 09:13 AM UTC Aug 12,2005 01:44 PM UTC WinForms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 12, 2005 09:13 AM UTC

How can I set a RowHeader text for each row in my grid? Kind regards Franz

Administrator [Syncfusion]
Replied On 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);

Administrator [Syncfusion]
Replied On 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); >

Administrator [Syncfusion]
Replied On 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;

Administrator [Syncfusion]
Replied On 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; >

Administrator [Syncfusion]
Replied On 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

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.

Warning Icon 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.Close Icon

;