Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
119
How to hide columns programmatically
posted

Hi, as I browsed, I found that I can use column choose dialog for hiding column functionality that the user can use. But I need to hide certain columns inside the code, not let the user choose it. I assume since the column choose dialog can do it, I should be able to do it too. But can't find any reference. Could you please provide me any directions?

 

Also, the band and overriden properties, are they only available at design time and through the initializelayout event? Can't I directly access them like any other property?

 

Thanks in advance.

Parents
No Data
Reply
  • 17259
    Verified Answer
    Offline posted

    To hide a column set column.Header.Hidden = true.

    You can access the band by grid.DisplayLayout.Bands[0], or 1 or 2 if you have more than one.

    What do you mean "overriden properties"?

     

Children