Groups | Blog | Home
all groups > dotnet windows forms databinding > june 2007 >

dotnet windows forms databinding : Bound DataGridViewCheckBoxColumn Doesn't Pass Value



6/29/2007 11:58:05 AM
I have a DataGridView (DGV) bound to a BindingSource, which itself is
bound to a custom list type that inherits from BindingList<T>
(SortableBindingList) to add sorting capability. Within the DGV there
is a bound DataGridViewCheckBoxColumn. The column is bound to a
"Selected" member within the list encapsulated by the BindingList<T>
implementation. The idea is that the CheckBoxColumn stays in sync with
the Selected member of the underlying bound list.

However, the value in the underlying list never changes. User checking/
unchecking the box doesn't result in any member changes within the
list. Setting the DataGridViewCheckBoxCell.Value (via a KeyPress event
handler) doesn't call the Selected property set either, but it does
change the visual state of the box.

What am I missing?

6/29/2007 4:49:33 PM
[quoted text, click to view]

After playing with things I've found the culprit. It appears that a
property with a Browsable(false) attribute will not bind. Even if you
add a Bindable(true), the column will not bind correctly.

Any ideas?
AddThis Social Bookmark Button