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

dictionary datasource..

1 Answer 264 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Saneesh
Top achievements
Rank 1
Saneesh asked on 01 Mar 2012, 09:26 AM
hi

been wondering if i can use a dictionary of the format dictionary<string,list<sqlToLinqClass>> as the datasource id so how can i retrive the values from the list.. or there is a better method..

Regards
Saneesh

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 02 Mar 2012, 03:19 PM
Hello Saneesh,

Yes, you can. The Dictionary<Key, Value> can be iterated like List<KeyValuePair<Key, Value>>. So every item in this List is KeyValuePair. Here are the expressions:

= Fields.Key //gives you the current key in your case string
= Fields.Value //gives you the current value, in your case List<sqlToLinqClass>
To use that List<sqlToLinqClass> you will have to bind it as a data-source to a repeater item (like Table, Crosstab, List)
Kind regards,
Elian
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
Saneesh
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or