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.
Unfortunately, activation email could not send to your email. Please try again.

GridGroupingControl and RowHeader text

Thread ID:

Created:

Updated:

Platform:

Replies:

33082 Aug 12,2005 05:13 AM Aug 12,2005 09:44 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 12, 2005 05:13 AM

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

Administrator [Syncfusion]
Replied On August 12, 2005 05:52 AM

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 07:19 AM

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 07:34 AM

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 09:08 AM

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 09:44 AM

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.

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.

;