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
1510
databinding to a hierarchial data-class not working
posted

Hi,

I have a hierarchial data ( 2 classes ... master class, with a collection of the child class )

I AM using this:

_ugTransactions.DisplayLayout.ViewType = Infragistics.WebUI.UltraWebGrid.

ViewType.Hierarchical;

and after I databind the Data to the Grid, it displays [+] in front of the rows which do have children ( not all rows have children ! ). But when I push the [+] it changes to [-] ( it's collapsed ) but I can't see any data under it ... ?!

What do I need to set to be to actually see the children ?

I can refere to them in the code ( in band[1] --> they're NOT null ... and they are visible = true and hidden = false ).

e.Layout.Bands[1].Columns.FromKey(

"Gjaldkeri").Header.Caption = "Gjaldkeri"; //this is band[1] ( the children )

 

//e.Layout.Bands[1].Columns.FromKey("Gjaldkeri").Hidden this property is false at run time, as it should be!

 

//e.Layout.Bands[1].Columns.FromKey("Gjaldkeri").Visible this property is TRUE, as it should be ... although it's not displaying

but why don't they actually DISPLAY in my Grid ?

This is an example of the datasource: ( in this example the data object has 12 children )
- the [+] is displayed in the Grid ... but they're not appearing when I push the [+], which turns into [-]:

  • 1510
    Suggested Answer
    posted

    nevermind ... I found out what the problem was:

    This is NOT allowed in the Page_Load with hierarchial databindings:

    _ugTransactions.DisplayLayout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.Automatic;

    so I deleted this line ..... and the children show up when I push the [+]