customizing nested tables
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
(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
SIGN IN To post a reply.
3 Replies
HA
haneefm
Syncfusion Team
July 12, 2007 04:01 PM UTC
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
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
VH
Vicko Hazdovac
July 13, 2007 08:42 AM UTC
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
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
HA
haneefm
Syncfusion Team
July 13, 2007 03:39 PM UTC
Hi Vicko,
Try Calling the ReIntialize method to refresh the grid after setting the datasource in a grid.
this.grid.ReIntialize();
Best regards,
Haneef
Try Calling the ReIntialize method to refresh the grid after setting the datasource in a grid.
this.grid.ReIntialize();
Best regards,
Haneef
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
VH Vicko Hazdovac
- Jul 12, 2007 06:22 AM UTC
- Jul 13, 2007 03:39 PM UTC