我是這樣做的
IList<CustomerInfo> IModel=.....;
this.bindingNavigator1.BindingSource = IModel;出現以下錯誤:
錯誤 3 型別 'System.Collections.Generic.IList<UiApp.Model.BasicInfo.CustomerInfo>' 不能隱含轉換為 'System.Windows.Forms.BindingSource'。已有明確轉換存在 (您是否漏掉了轉型?請教應該如何綁定!

解决方案 »

  1.   

    我主要目的是實現以下功能------將bindingnavigator,Treeview,和顯示數據的TextBox控件 三者綁定起來,當單擊bindingnavigator的上一條,下一條按鈕時TreeView和TextBox都變更。我用的數據源是IList<>。請教大家實現此功能的思路的話。謝謝!!
      

  2.   

    你可以这样的,在bindingnavigator的属性中
    datasource = 实体类
      

  3.   

    我主要目的是實現以下功能------將bindingnavigator,Treeview,和顯示數據的TextBox控件  三者綁定起來,當單擊bindingnavigator的上一條,下一條按鈕時TreeView和TextBox都變更。  
     
    bindingSource.datasource=IList<>類型;
    bindingNavigator.bindingsource=bindingsource;
    但是TreeView就不知道怎麼綁定才能實現期望的功能咯!!
     
    請教大家實現此功能的思路。謝謝!!