I use 2014.1 and i have AutoGenerateColumns="false"
I want to show or hide column depend on condition and its not work.
On First level its works!
whdg.Columns(3).Hidden = False or True (Work well)
On second band its not works and i try some way
whdg.Bands(0).Columns(3).Hidden = False or True (Don't work) whdg.GridView.Bands(0).Columns(3).Hidden = False or True (Don't work)
Hi,
Thank you for posting on our forums.
When manually defining columns in the for each band in the WebHierarchicalDataGrid, you can utilize Bands collection as done in your first attempt to hide columns. I believe this isn't working for you because the index of (0) you've passed into the bands collection will return the parent band for the WebHierarchicalDataGrid.
The following code should work for you:wdhg.Bands(1).Columns(3).Hidden = True
I have attached a sample which demonstrates the hiding of a "Department" column on the second band.
Here is the relevant code in my sample:Me.WebHierarchicalDataGrid1.Bands("Employees").Columns("Department").Hidden = True
Please review the sample and let me know if you have any questions.
I try both line and does'nt work :(
whdg.GridView.Bands("Niv2").Columns("col_01").Hidden = True whdg.Bands("Niv2").Columns("col_01").Hidden = True
Were you able to get this working with the sample I've provided?
There may be a reason why the suggestion I've provided isn't working for you, but I wont be able to pinpoint the reason without being able to reproduce the issue on my end. Please update me with a sample, or modify my sample, to reproduce the issue and I will be happy to investigate the why the hidden property isn't working for you.
I am looking forward to your update.
Please let me know if you were able to hide columns in the WebHierarchicalDataGrid using the suggestions I've provided thus far.