Bindind DataTable with silverlight Datagrid
I am writing an app which is to be intranet based .I am trying to use silverlight with 开发者_StackOverflow社区Ado.net Just like I write my aspx pages. BUt I have not found how to connect datatable generated from my class directly to my silverlight interfaces.
ANy tut that can help me with this.
Silverlight cannot connect to a database directly, it only supports webservice access. Here are two links to get you started:
http://wildermuth.com/2009/09/29/Choosing_a_Data_Access_Layer_for_Silverlight_3
http://www.c-sharpcorner.com/uploadfile/nipuntomar/dataaccesssilverlightenabledwcfservice07152008013110am/dataaccesssilverlightenabledwcfservice.aspx
Or just google "silverlight data access" and you will get plenty of hits.
If you insist on using DataTable
s, you may take a look at the BindableDataGrid project which includes these.
I however strongly recommend against. A better approach for dynamic data would perhaps be to use some kind of DynamicEntity
class.
精彩评论