2012-03-29 72 views
0

Microsoft JScript運行時錯誤:Sys.WebForms.PageRequestManagerServerErrorException: A field or property with name 'Year' was not found in the selected data source. Possible causes of this error may be the following: an incorrect or case-insensitive spelling of the grid column name; assigning a wrong or not properly initialized data source to the grid關於Dev express網格視圖運行時錯誤

我想在devexpress中綁定一個數據源到gridview它是第一次加載後,我應用一些更多的過濾器與年份,月份和客戶端然後我會得到這個錯誤是什麼問題表顯示的數據但它不綁定到網格,請告訴我

編輯

ASPxGridVendor.DataSource = Nothing 
ASPxGridVendor.DataBind() 
ASPxGridVendor.DataSource = Session("DSGrid") 
ASPxGridVendor.DataBind() 
+0

任何人都可以找出問題 – 2012-04-02 09:00:20

回答

0

如果通過回發將你的過濾器,你需要用你的數據源再次重新綁定gridview的

+0

我在page_init(()方法中執行此操作,但當我調試此控件時,錯誤即將到達databind ),那麼它將會catch塊 – 2012-03-29 13:08:55

+0

你能告訴我們你的GridView的代碼? – 2012-03-29 13:13:07

+0

ASPxGridVendor.DataSource =無 ASPxGridVendor.DataBind() ASPxGridVendor.DataSource =會議( 「DSGrid」) ASPxGridVendor.DataBind() – 2012-03-29 13:16:05

0

聽起來像是在異常消息中的答案。數據源中不存在「Year」列...

+0

亞,但列沒有給網格視圖 – 2012-03-30 09:35:23

+0

任何人都可以找出這些問題的問題沒有解決 – 2012-04-02 08:26:25