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
1210
Hierarchy with UltraDataSource
posted

Hi Guys,

 

I have some DataTables - which have relations between them. I would like to build an hierarchical UltraDataSource from them.

I'm a ware to the fact that this data tables should be converted by iterating over the rows and inserting them into the UltraDataSource.

What i don't get is how to define the relationships, for example in DataSet can set Relations between columns of the data tables columns simply by dataSource.Relations.Add(columnsTableA, columnsTableB).

I want to know how to do it with UltraDataSource. I want to deine the bands and the relations between those bands.

For example in DataSet i do:

            var relationX = new DataColumn[]{table0.Columns["C1"]}
            var relationY = new DataColumn[]{table1.Columns["C2"]};
            ds.Relations.Add(relationX, relationY);

And this sets the hierarchical structure.

Actually i'm trying to convert an hierarchical dataset into UltraDataSource with no success.

Can you help - do you guys have a procedure for this - or something that would help?

Help will be appriciated much!

 

BTW: I want to convert it to UltraDataSet since it has the LoadOnDemand feature.

Thanx, Gili

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Gili,

    UltraDataSource does not calculate the relationships like a DataSet. UltraDataSource is essentially a tree structure. If you were going to copy your data set into an UltraDataSource, you would basically add the root level rows, and then under each parent row you would add the child rows.

    However, if you are planning to load the data on-demand, then copying the actual row data up front doesn't really make sense. What you should do is just set up the bands and columns and then handle events like CellDataRequested to actually populate the UltraDataSource with data.

Children