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

Can't cast selected row

3 Answers 31 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kennet
Top achievements
Rank 2
Kennet asked on 24 Jun 2010, 09:33 AM

I'm using endless scrolling.  (based on this code: "Endless scrolling of 2mil. records" that is updated for Q2010 here: http://www.telerik.com/ClientsFiles/159249_wpfapplication1.zip)

The problem is I can't get data from selected row. I see the data in debugger (var row = radGrid.SelectedItem;) but don't know How to get.

I can change the "QueryableCollectionView" from:
orderby s.artist, s.title 
select new { s.artist, s.title, s.id}); 


to:
orderby s.artist, s.title 
select s); 


Then I can get my class from Datacontex, but then the grid scroll to top evrytime it fill ut with new data, and I don't like that...






f__AnonymousType

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 24 Jun 2010, 04:01 PM
Hi Kennet,

The sample uses anonymous types and that is why you cannot cast to them. You can consider using ordinary classes. 

For some reason I cannot access the sample project. If you would like us to help you update the project I would like to ask you to upload the project again. 

Sincerely yours,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kennet
Top achievements
Rank 2
answered on 24 Jun 2010, 04:09 PM
Hi.

The link works fine for me (the project is from Telerik). link

Not sure how I shoul do the "endless scrolling" with ordinary classes.

Ken





0
Vlad
Telerik team
answered on 24 Jun 2010, 04:21 PM
Hello Kennet,

 The application is using anonymous types just to simulate large data - join between Orders and Order_Details.

Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Kennet
Top achievements
Rank 2
Answers by
Milan
Telerik team
Kennet
Top achievements
Rank 2
Vlad
Telerik team
Share this question
or