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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

118259 Feb 17,2015 06:31 AM Feb 19,2015 11:20 PM Windows Forms 3
loading
Tags: GridGroupingControl
Supriya Varne
Asked On February 17, 2015 06:31 AM

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

Neelakandan Kannan [Syncfusion]
Replied On February 17, 2015 11:46 PM

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

Supriya Varne
Replied On February 18, 2015 01:52 AM

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

Thanks and Regards,
Supriya

Neelakandan Kannan [Syncfusion]
Replied On February 19, 2015 11:20 PM

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

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.

;