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

Get a var from Items...

2 Answers 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marc Roussel
Top achievements
Rank 2
Marc Roussel asked on 02 Feb 2011, 02:10 PM
I'm trying to do a Linq query on the items of the GridView but I don't know how to go about that.  I tried several ways and I'm unable to figure out how to convert or get the list out of GridViewItems

This is my last attenpt which doesn't work at all..

var SumQuantity = (FROM ocs IN rgvShipTos.Items.OfType<ObservableCollection<Foo_OC_ShipTo>>().ToList())
                                    SELECT ocs.Qty).Sum();

Thank you fro any help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 02 Feb 2011, 02:13 PM
Hi,

The type used in OfType<>() should be your data item type. 

Greetings,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Marc Roussel
Top achievements
Rank 2
answered on 02 Feb 2011, 02:18 PM
Thank you
Tags
GridView
Asked by
Marc Roussel
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Marc Roussel
Top achievements
Rank 2
Share this question
or