Kevin,
In your checkbox class, you need an Event Handler for the Format event of the Binding:
Binding oBind = new Binding("Checked", MyTable, MyColumn);
oBind.Format += new ConvertEventHandler(this.FormatHandler);
protected virtual void FormatHandler(object sender, ConvertEventArgs e)
{
if (e.Value == System.DBNull.Value)
e.Value = false;
}
~~Bonnie
>Bonnie,
>
>>Boolean null columns are only a pain because the checkbox control doesn't handle a null very elegantly. So, you have to have a checkbox subclass that'll handle that.
>
>PMFJI, but do you have any code examples (preferably C#) as to how to implement this?
>
>TIA, Kevin