作者y907372002 (yvonne)
看板C_Sharp
標題[問題] silverlight for 讀資料庫資料
時間Mon Apr 16 16:42:30 2012
您們好:
目前程式撰寫遇到一個問題
我試著建了資料庫實體模型(.edmx)
再建立網域服務類別(domainservice.cs)
照著網路上的說明做
然後在前台mainpage.xaml建一個DataGrid初始化讀取資料如下
projectWeb.tempDomainService1 _OrganizationContext =
new projectWeb.tempDomainService1();
this.dataGrid1.ItemsSource = _OrganizationContext.tables;
_OrganizationContext.Load(_OrganizationContext.GettableQuery());
此資料表是有資料的,而且在網頁上show的出第一列資料表的欄位名稱
但就是內容是空的,一筆資料都沒show出來.
請問是哪裡出了問題呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.251.183.241
1F:→ ashram:silverlight板好像剛成立 可以去問問 04/18 10:39
2F:→ ashram:不過老實說你的問題有點不太清楚.. 04/18 10:39
3F:→ ashram:而且有實際debug試過確定有資料下來嗎? 04/18 10:40