开发者

Simple DataGrid Binding to Remote SQL Server 2005/8 Database

How can we Use a DataGrid in WPF to show/update/add/delete records in a Table? I have watched/read and tried many tutorials, but I can't find a single, easy to understand tutorial on how to bind data with a remote开发者_如何学Go database.

I can't seem to find anything like this.


Well, if you want to use Linq2Sql (less difficult to learn than EntityFramework) try a tutorial like this one: http://www.codeproject.com/KB/WPF/WPFDataGrid.aspx

or http://www.codeproject.com/KB/WPF/WPFDataGridExamples.aspx

And you will do fine.


You are going to have to choose a data access technique to retrieve the records from the DB to create data that you can bind to.

The most modern approach is to use the EntityFramework - excellent concept - It will save you a lot of development time in the long-run but has a huge learning curve.

Not wanting to tackle that, you can use DataSets by connecting to a datasource from the Server Explorer of visual studio, right clicking on the tables that you link and creating a data-bound grid on your WPF page.

Either way, there is more learning to do but hopefully you have more of an idea where to start learning.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜