How can I bind a c#.net DataView (WPF) to a SQLite database?
I am using the official System.Data.SQLite ADO.NET provider for my application, and I am trying to display the contents of a database in a WPF DataGrid. Currently I am able to select the data I need to display from the database, but I don't how to display that data on the datagrid.
I have search on the web, read blog posts, tutorials and guides, but to no avail. I am moving an application from a PHP system (using my local server) to a desktop application to be portable across systems. My current applications uses sqlite3 databases, 开发者_运维知识库and contains quite a few rows. This is why I would prefer to make sqlite work with c#, which is the desktop oriented language I am most comfortable with.
You should just have to Bind the column to the name of the field in the db.
<local:AutoGenerateColumn Column="ItemStatusId"
Binding="{Binding Path=ItemStatusId}" />
Here's a link to a pretty good tutorial: http://www.codeproject.com/KB/WPF/DataGridAutoTemplate.aspx
精彩评论