2
我有一個綁定到一個BindingSource的與數據源作爲活動記錄模型的列表的DataGridView:綁定DataGridViewCheckBoxColumn沒有更新綁定源
BindingSource bs = new BindingSource();
bs.DataSource = _user.Addresses;
地址布爾屬性命名的實際,和我的DataGridView有CheckBoxColumn:
DataGridViewCheckBoxColumn c = new DataGridViewCheckBoxColumn(false);
c.Name = "actualColumn";
c.HeaderText = "Aktualny";
c.DataPropertyName = "Actual";
c.AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader;
addressesDataGridView.Columns.Add(c);
正確顯示來自數據庫的數據。
當我點擊選中的複選框單元格,並取消選中它,然後去保存按鈕,屬性實際在我的bindingsource不是沒有選中。
當我點擊選中的複選框單元格並取消選中它並更改行選擇,然後單擊保存時,按鈕更改在綁定源中可見。
此問題是否存在解決方法?
沒有你的建議的工作,但你鼓舞了我(爲+1 :),謝謝)出發,按照上保存功能的榜首位工作: addressesDataGridView.EndEdit() – 2010-01-12 19:56:01