In the foreach loop you will have to cast the item to your custom object as shown bellow:
MyDataItem myItem = item
var value1 = myItem.Value1;
var value2 = myItem.Value2;
The code above will work only if your custom object (ex: MyDataItem) contains the Value1 and Value2 properties.
If this does not answer your question, could you please elaborate a bit more on the scenario you have and what you're trying to achieve. I'd be glad to assist you further.
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal
to submit ideas, feedback and vote for them.