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

Bind to Linq to Sql

5 Answers 276 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lorenzo Castrico
Top achievements
Rank 2
Lorenzo Castrico asked on 09 Aug 2008, 10:04 AM
Hello,
I tried different binding method with you gridview and i was able to make it work.
I'd like to see a sample project(wpf web project) using this scenario:
objectdataprovider using as datacontext a linqtosql class with the ability to update , delete and insert.

Thanks
Regards

5 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 12 Aug 2008, 06:36 AM
Hello Vincenzo Casolani,

I've created a sample project for you that demonstrates how to use LinqToSql with our RadGridView control.
I've chosen to create the sample project as a standard WPF application since the limitations of Xbap applications would have made the sample too complicated and cumbersome to understand. The are quite a few comments in the sample that should aid you to quickly understand how to implement CRUD functionality using our grid control.

Hope this helps.

All the best,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Lorenzo Castrico
Top achievements
Rank 2
answered on 12 Aug 2008, 02:26 PM
Thanx, the sample was very helpfull.
I was able to implement your code in a wpf partial trust browser app.
I submitted a support ticket with my project to help solve a bug i found

Thanx again
Regards
0
Milan
Telerik team
answered on 14 Aug 2008, 08:26 AM
Hello Vincenzo Casolani,

I'm glad that the sample was helpful. We will be looking into ticket you submitted.

Regards,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kevin
Top achievements
Rank 1
answered on 18 Jul 2009, 11:46 PM

Hi,

I could not get this project to work. I am using 2009 Q2, not sure if this is why it is failing.

I to need a sample of a WPF app showing how to bind to a table in an SQL database also allowing inserts, update and deletes.

I have tried a number of methods to achieve this but they seem very long winded or I just could not get them to work.

Your sample looks very light from a code so would be keen to get this going to see how it works.

Cheers in advance...

Kevin.

PS. The errors I am getting are:

Error 1 The type or namespace name 'UI' does not exist in the namespace 'Telerik.Windows.Controls' (are you missing an assembly reference?) C:\Work\Temp\096083_LinqToSql\LinqToSql\LinqToSql\Window1.xaml.cs 89 84 LinqToSql

Error 2 The type or namespace name 'UI' does not exist in the namespace 'Telerik.Windows.Controls' (are you missing an assembly reference?) C:\Work\Temp\096083_LinqToSql\LinqToSql\LinqToSql\Window1.xaml.cs 104 85 LinqToSql

Error 3 Cannot find the type 'local:DataProvider'. Note that type names are case sensitive. Line 10 Position 54. C:\Work\Temp\096083_LinqToSql\LinqToSql\LinqToSql\Window1.xaml 10 54 LinqToSql

0
Stefan Dobrev
Telerik team
answered on 23 Jul 2009, 07:21 AM
Hello Kevin,

I'm attaching an updated version of this example. It includes ViewModel for RadGridView and also a stripped version of the Prism's DelegateCommand. Hope you will find it useful.

Greetings,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Lorenzo Castrico
Top achievements
Rank 2
Answers by
Milan
Telerik team
Lorenzo Castrico
Top achievements
Rank 2
Kevin
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Share this question
or