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
close icon

How to hide and add columns in child table in gridgrouping control of syncfusion

Hi,
I am using Gridgrouping control.
I have Parent-Child Relationship in the control.
How to hide and add columns in child table in gridgrouping control of syncfusion.
When I click on hide columns button i want to hide columns from child table and when I click the Show columns buttton i want to add (show)the columns in child table .
 
Thank you and Regards,
Supriya

3 Replies

NK Neelakandan Kannan Syncfusion Team February 18, 2015 04:46 AM UTC

Hi Supriya,

 

Thank you for using Syncfusion products.

 

If you want to hide or show the child columns when pressing buttons, you need to use VisibleColumns property of TableDescriptor of child table. Please make use of below code and attached sample,

 

Code Snippet:

Private Sub button1_Click(ByVal sender As ObjectByVal As EventArgs)
        
Dim childTableDescriptor As GridTableDescriptor = Me.gridGroupingControl1.GetTableDescriptor("MyChildTable")
        
'Specify your child table name
        
childTableDescriptor.VisibleColumns.Remove("Name")
    
End Sub
    
    Private Sub 
button2_Click(ByVal sender As ObjectByVal As EventArgs)
        
Dim childTableDescriptor As GridTableDescriptor = Me.gridGroupingControl1.GetTableDescriptor("MyChildTable")
        
'Specify your child table name
        
childTableDescriptor.VisibleColumns.Add("Name")
    
End Sub

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan


Attachment: Sample_Hide_Show_Columns_5c5f716.zip


SV Supriya Varne February 18, 2015 06:52 AM UTC

Hi,
Sir columns in child table remove successfully but these columns not showing when click the show columns buttton 

Thanks and Regards,
Supriya


NK Neelakandan Kannan Syncfusion Team February 20, 2015 04:20 AM UTC

Hi Supriya,

 

Thank you for your update.

 

We regret to let you know that we could not able to reproduce your scenario. The child columns will be shown if you use Add property of VisibleColumns. Please refer the below code and sample video. If you have still an issue, please provide us simple sample or modify the sample which has been provided in previous update. It would be more helpful for us to provide better solution as soon as possible.

 

Code Snippet:

Dim childTableDescriptor As GridTableDescriptor = Me.gridGroupingControl1.GetTableDescriptor("MyChildTable")

childTableDescriptor.VisibleColumns.Add("Name") ‘Specify your needed child table column name to show

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan


Attachment: Sample_Video_118259_ba17f23f.zip

Loader.
Live Chat Icon For mobile
Up arrow icon