This is a migrated thread and some comments may be shown as answers.

Collection item in table problem

1 Answer 59 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ahmad
Top achievements
Rank 1
Ahmad asked on 13 Aug 2014, 02:59 AM
Hello all,

I'm currently having a problem where the collection items values are not in the same table. I'm using objectdatasource as my table data source.


Desired output:
No   Description
1      Value1
2      Value2


Current Output:

No  Description
1     Value1

No Description
1    Value2


Property : 

public class Test {

public List<Descriptions> myCollection
        {
            get
            {
                return myCollection;
            }
        }

}


public class Descriptions 
    {

public string Description
        {
            get { return description; }
            set
            {
                if (description == value) return;

                description = value;
              
            }
        }
}


This is how i set my data source:

Test t = new Test();

objectDataSource.DataSource = t.myCollection;
tabledatasource = objectDatasource;

Your help is much appreciated
Thx

























1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 14 Aug 2014, 02:21 PM
Hello Ahmad,

The business object can be wrapped in an ObjectDataSource component set as the report's DataSource. Then you can use Table/List/Crosstab item for the collection property of the main business object. The Table/List/Crosstab item is a data item with its own DataSource and ordering, filtering and grouping functionality.

The item can be bound to collection property as in the following articles:


I hope the above information is helpful.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Ahmad
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or