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
25
Creating bands for childnodes in code behind without postback
posted

Hello, I am creating my whole WebHierarchicalDataGrid in a separate function in codebehind.

I create a couple of Dataviews with Relations and bands with columns for the levels.

Now some strange things happen:

As soon as i set the initialbandwith to something other than 0 and add columns to the childbands(autogeneratecolumns=false), in InitializeBand or directly after the band creation, i get an "Object reference not set to an instance of an object." exception.

When i add the bands without manuel defined columns, the grid is loading without exception. The  band properties foreach level, like showHeader, are working though.

With initialbandwith set to 0 everything works fine, and i can open and close different levels of my grid even with my custom defined columns showing. Performance and Datastrucutre-wise, this is not an option for us.

Impartial from the initialbandwith the root columns are always correct.

So my question is, what is the right way to load all data at once with custom bands for each level? It would be enough for us, if we could access and manipulate the autogenerated columns from the bands. Sadly there is no documented way of doing this.