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
125
Column hiding generates null pointer exception
posted

I want to hide some columns on my root table et some other on the child. My data source is a simple dataset containing 2 tables linked with a relationship. The bindind and the data displayed is correct: I can expand et shrink the data.

But, when I want to hide a column,  in the pageload event (just after data binding) with myGrid.GridContent.Columns(0).Hidden=true, I got the error.  It seems that the data is not already loaded in the structure of the grid after de data binding.

What  can I do to solve the problem?

Parents
No Data
Reply
  • 2783
    posted

    Hi,

    You need to define your columns for the band in the ASPX and then set the Hidden property on the column that you want to hide to true.  The the AutoGenerateColumns property on the Band (or the grid if you are doing that on the top level) to false.

    Thanks,

    Olga

Children