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.

customizing nested tables

Thread ID:

Created:

Updated:

Platform:

Replies:

63976 Jul 12,2007 02:22 AM Jul 13,2007 11:39 AM Windows Forms 3
loading
Tags: GridControl
Vicko Hazdovac
Asked On July 12, 2007 02:22 AM

Hi I'm wondering how can I influence the appearance of nested tables in a grid grouping control

(column header text, and visibility for instance)

So far I've only found ChildGroupOptions property but that's not enough. I need to modify every nested table individually. (I need access to every nested table's table descriptor and grid column descriptor)

I've attached an example so you can modify it.

WindowsApplication1109.zip

haneefm [Syncfusion]
Replied On July 12, 2007 12:01 PM

Hi Vicko,

what I need is acces to table descriptor of every nested table?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can get the table descriptor by using the GetTableDescriptor method. Here is a code:

GridTableDescriptor td1 = gridGroupingControl1.GetTableDescriptor("Table1");
td1.Appearance.AnyRecordFieldCell.BackColor = Color.LightGoldenrodYellow;

How can I remove the "More stuff" fom visible columns?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can use the VisibleColumns collection to remove the column in a grid. Refer the below code.

GridTableDescriptor td3 = gridGroupingControl1.GetTableDescriptor("Table3");
td3.Appearance.AnyRecordFieldCell.BackColor = Color.SeaGreen;

td3.VisibleColumns.Remove("More stuff");

How can i change the header text of "Nothin much" column?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can change the header text of the column by using the GridColumnDescriptor.HeaderText property. Below is a code snippet

GridTableDescriptor td2 = gridGroupingControl1.GetTableDescriptor("Table2");
td2.Appearance.AnyRecordFieldCell.BackColor = Color.SkyBlue;

td2.Columns["Nothing much"].HeaderText = "ChangeHeaderText";

How can i change text of table3 caption to say "3d table"
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The Group CaptionText can be customized using the TableDescriptor.ChildGroupOptions.CaptionText property (gridGroupingGrid.TableDescriptor.ChildGroupOptions.CaptionText = "{CategoryName}: {Category}";).
The QueryCellStyleInfo event can also be handled to have your own text, there check for the e.TableCellIdentity.TableCellType to be GroupCaptionCell and set the text. Kindly refer to the forum thread below for more details.

http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=11530
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=34184

Best regards,
Haneef

Vicko Hazdovac
Replied On July 13, 2007 04:42 AM

This is great but I have another problem.

I can't access the table descriptor object of any nested table when assigning the data source object for the first time.

After that everything works just fine. I've attached a code snippet to show you what I mean.

I'm sure I'm doing something wrong but I just can't figure it out.

Thanks in advance.

Example33.zip

haneefm [Syncfusion]
Replied On July 13, 2007 11:39 AM

Hi Vicko,

Try Calling the ReIntialize method to refresh the grid after setting the datasource in a grid.

this.grid.ReIntialize();

Best regards,
Haneef

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.

;