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. Image for the cookie policy date

MyGrandChildTable

Hi

jak zmienić MyGrandChildTable
Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.CheckBox;


 ((GridTableDescriptor)this.gridGroupingControl1.TableDescriptor.Relations["MyGrandChildTable"].ChildTableDescriptor).Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.CheckBox;
            ((GridTableDescriptor)this.gridGroupingControl1.TableDescriptor.Relations["MyGrandChildTable"].ChildTableDescriptor).Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CheckBoxOptions = new GridCheckBoxCellInfo("Y", "N", "-1", true);//("Y", "N", "", True)
            ((GridTableDescriptor)this.gridGroupingControl1.TableDescriptor.Relations["MyGrandChildTable"].ChildTableDescriptor).Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.Description = "T/N-MyGrandChildTable";
        


Attachment: Related_Master_Details_Demo_9b15fd08.rar

5 Replies

PM Piruthiviraj Malaimelraj Syncfusion Team June 27, 2016 09:07 AM UTC

Hi Grzegorz, 

Thank you for using Syncfusion Products. 

We have analyzed your sample and it seems that you are trying to retrieve the “MyGrandChildTable” from “ParentTable” descriptor. But actually MyGrandChildTable  is added to the Child table (“MyChildTable”). So “MyChildTable” table descriptor has to be get using the GetTableDescriptor method to set the styles for grandchild tables. Please make use of below code, 

Code Snippet 
GridTableDescriptor GrandChildTableDescriptor = this.gridGroupingControl1.GetTableDescriptor("MyChildTable"); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.CheckBox; 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CheckBoxOptions = new GridCheckBoxCellInfo("Y", "N", "-1", true); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.Description = "T/N-MyGrandChildTable"; 
 
Sample link 

Regards, 
Piruthiviraj 



GP Gregory Pe replied to Piruthiviraj Malaimelraj June 27, 2016 10:21 AM UTC

Hi Grzegorz, 

Thank you for using Syncfusion Products. 

We have analyzed your sample and it seems that you are trying to retrieve the “MyGrandChildTable” from “ParentTable” descriptor. But actually MyGrandChildTable  is added to the Child table (“MyChildTable”). So “MyChildTable” table descriptor has to be get using the GetTableDescriptor method to set the styles for grandchild tables. Please make use of below code, 

Code Snippet 
GridTableDescriptor GrandChildTableDescriptor = this.gridGroupingControl1.GetTableDescriptor("MyChildTable"); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.CheckBox; 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CheckBoxOptions = new GridCheckBoxCellInfo("Y", "N", "-1", true); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.Description = "T/N-MyGrandChildTable"; 
 
Sample link 

Regards, 
Piruthiviraj 



Hi Piruthiviraj

Thank you, but the solution does not change -CheckBox;
GridCellTypeName.CheckBox;

Regards,
Grzegorz


PM Piruthiviraj Malaimelraj Syncfusion Team June 28, 2016 12:35 PM UTC

Hi Grzegorz, 
 
Thank you for your update. 
 
Here we have provided the modified sample which shows that the checkbox is added for all the tables. Please make use of below code. 
 
 
 
Code snippet 
 
GridTableDescriptor GrandChildTableDescriptor = this.gridGroupingControl1.GetTableDescriptor("MyGrandChildTable"); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.CheckBox; 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CheckBoxOptions = new GridCheckBoxCellInfo("Y", "N", "-1", true); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.Description = "Sample"; 
 
Sample link 

Please let us know if we missed anything. 

Regards, 
Piruthiviraj 



GP Gregory Pe replied to Piruthiviraj Malaimelraj June 28, 2016 12:53 PM UTC

Hi Grzegorz, 
 
Thank you for your update. 
 
Here we have provided the modified sample which shows that the checkbox is added for all the tables. Please make use of below code. 
 
 
 
Code snippet 
 
GridTableDescriptor GrandChildTableDescriptor = this.gridGroupingControl1.GetTableDescriptor("MyGrandChildTable"); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.CheckBox; 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.CheckBoxOptions = new GridCheckBoxCellInfo("Y", "N", "-1", true); 
GrandChildTableDescriptor.Columns.FindByMappingName("Name").Appearance.AnyRecordFieldCell.Description = "Sample"; 
 
Sample link 

Please let us know if we missed anything. 

Regards, 
Piruthiviraj 


Hi Piruthiviraj
perfectly
thank you




PM Piruthiviraj Malaimelraj Syncfusion Team June 29, 2016 05:51 AM UTC

Hi Grzegorz, 
 
We are glad to hear from you that the given solution is resolved your problem. Please let us know if you have any other queries. 
 
Regards, 
Piruthiviraj 


Loader.
Live Chat Icon For mobile
Up arrow icon