Hello,
in my new project i have to show two types of object in one tree. Each of the objecttypes must be shown in different subtees with his own root node.
Infragistics is able to show a "DataSource" via DataBinding.
For Example:
"ObjectQuery<WorkpiecesGroups> WorkpiecesGroupesQuery = workpieceContext.WorkpiecesGroups.Where("it.ParentWorkpiecesGroup is NULL"); this.ultraTreeRequirements.DataSource = WorkpiecesGroupesQuery.ToList();
It is possible to show the Data from two different Datasources?
For example with a "Datasource.Add' - Method? So that one root node with children is from datasource of Ado.Net dataSet and the other root node with children from datasource type of Ado.Net EntityFramework?
thanks and greatings: Rudi
Hi Rudy,
Yes, this is possible. What you do is add two nodes to the root level of the tree. Then, instead of binding the entire tree, you just bind the child nodes of those two nodes.
UltraTreeNode node = this.ultraTree1.Nodes.Add("My first Node");node.Nodes.SetDataBinding(dataSource, dataMember);
Hi Mike,
thank you, it works a little bit...
But i have the problem, that the interfaces of EntityObjects ar not identical, so that always the columns of first subtree is shown. Is there the posssibility to show different columns in the same level of both subtrees? It works if I use a DataSet without setting a special DataMember. In this case for all Subtrees of each Datamember the different ColumnSet is shown.
Since I use a EntityObject (Query) as Data Source i find no choice to set a special DataMember. Is there another way to implement it for different class interfaces? The implemented Code as follows:
//populate root and Tree for Datasource One
ObjectQuery<EntityClass1> EntityClass1Query = workpieceContext.EntityClass1.Where("it.ParentEntityClass1 is NULL"); UltraTreeNode nodeWP = this.ultraTreeRequirements.Nodes.Add("Laborhilfsmittel");nodeWP.Nodes.SetDataBinding(EntityClass1Query.ToList(), "");
//populate root and Tree for Datasource Two
ObjectQuery<EntityClass2> EntityClass2Query = workpieceContext.EntityClass2;UltraTreeNode nodeComp = this.ultraTreeRequirements.Nodes.Add("Komponenten");nodeComp.Nodes.SetDataBinding(EntityClass2Query, "");
Thank you and Greatings: Rudy