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

RadGridView with POCO/Self Tracking Data classes

12 Answers 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Wasif Jahangir
Top achievements
Rank 1
Wasif Jahangir asked on 02 Jun 2010, 01:49 PM
I Need to know what is SUPPORT for POCO classes with Telerik Control Especially with RadGridView control.

however need to know what is Support for selfTracking Enitities / Linq to SQL/ WCF Data Services.


12 Answers, 1 is accepted

Sort by
0
Wasif Jahangir
Top achievements
Rank 1
answered on 03 Jun 2010, 08:53 AM
anyone have idea of RadGridview with POCO/Self Tracking data classes.....???
0
Vlad
Telerik team
answered on 07 Jun 2010, 06:07 AM
Hi,

Can you post more info about your scenario? Do you get any errors or something supported by standard WPF DataGrid is not working properly with RadGridView?

Kind regards,
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.
0
Wasif Jahangir
Top achievements
Rank 1
answered on 07 Jun 2010, 06:15 AM
Im Using WPF Toolkit not Silverlight. and i downloaded your latest toolkit in last week. and im at Windows 7
the issue i m facing is

RadGridView.ItemSource = MyCollection; // my Collection implements ICollection
This gave me error (on Pressing Insert Key) of Casting From Dynamic Classes as i m using Poco in EDM

but When i used
RadGridview.ItemSource = MyCollection.ToList();
it Works fine. i.e. but concern is why we need to do this? this is a major concern and we dont need overhead of Casting to list and back from List.

second major concern is we have to hit Insert for new Row at bottom. cant it behave like normal WPF grid where an already Empty row at bottom and upon hitting Tab at last column will generate a new one.
0
Wasif Jahangir
Top achievements
Rank 1
answered on 07 Jun 2010, 06:32 AM
Due to this issue we have concerns if tomorrow we change our architecture to WCF Data classes or self tracking then it might create problem. as currently our development is in initial stage. and we need to finalize toolkit. so can you share a sample with each case?
0
Vlad
Telerik team
answered on 07 Jun 2010, 06:33 AM
Hello,

I'm not sure about your collection however I believe that I've already posted an example project here and everything worked normally - no cast exceptions. You do not need to call ToList() just create CollectionView similar to the posted project and you will have everything - add, delete, insert, etc.

All the best,
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.
0
Wasif Jahangir
Top achievements
Rank 1
answered on 07 Jun 2010, 07:29 AM
Iveuploaded a video describing my scenario.
http://horizon-world1.selfip.com:7070/new/telerik.rar
have a look on it. thanks



0
Vlad
Telerik team
answered on 07 Jun 2010, 07:52 AM
Hello,

Unfortunately the link is not accessible. Can you post the same on screencast or somewhere else?

Regards,
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.
0
Wasif Jahangir
Top achievements
Rank 1
answered on 07 Jun 2010, 09:18 AM

http://www.screencast.com/t/ZjE2YmQwY

use this link to download. thanks
0
Wasif Jahangir
Top achievements
Rank 1
answered on 07 Jun 2010, 12:26 PM
did you able to see that vdo....?
what could be the possible issue
The grid above have following collection
{System.Data.Objects.DataClasses.EntityCollection<Agility.Data.ProcurementRequestDetail>

and grid below to implements ICollection  (and it is working fine)
0
Stefan Dobrev
Telerik team
answered on 09 Jun 2010, 07:47 AM
Hello Wasif,

I have answered your question in the support thread you have started. Let's continue the discussion there.

Regards,
Stefan Dobrev
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
Muhammad
Top achievements
Rank 1
answered on 11 Jun 2010, 08:40 PM
Hi,
I am trying to use latest Entity Framework 4 with POCO Classes with .Net 4.0 WPF. I got the same error.
Consider the order and order details scenario. one order has order details collection.
Previously I have used WPF data grid. With WPF Datagrid, I give itemsource={Binding OrderDetails } in xaml in data grid and provide this.DataContext = SelectedOrder in xaml.cs file. I provided bindings for  all Product, UnitPrice, Quanity ,amount etc in Grid Columns in xaml. It successfully worked in all (insertion,deletion and updation)operations.
Using same thing in teleic Grid view, It show all data perfectly. But when i press inser key to add new records, It shows me an exception of Cannot conver Dynamic Proxies in ..... Through detailed analysis, I have found that  all the orderdetail obejects in collection are of type dynamic proxies of order detail, but the new record I inserted is of type order detail. It tries to convert proxies into order detail object... Any idea..?
0
Muhammad
Top achievements
Rank 1
answered on 13 Jun 2010, 05:55 AM
Hi,
It seems I have figured out problem. As I am using Entity Framework 4 Poco Classes, Its new opbject creation is not like the same as we do with other objects like something = new SomeThing();. The new opbject is created by your object context create method
For Example
MyE4Entities en = new MyE4Entities();
en.OrderDetails.CreateObject();
It will return your proxy object as you have in collection.
 
In GridView AddNew event you have to assign e.NewObject = above created object. I hope that would be helpful
Thanks
Zubair
Tags
GridView
Asked by
Wasif Jahangir
Top achievements
Rank 1
Answers by
Wasif Jahangir
Top achievements
Rank 1
Vlad
Telerik team
Stefan Dobrev
Telerik team
Muhammad
Top achievements
Rank 1
Share this question
or