I have to a bind check box in my application with a value which is
coming from database.

I have two values which are coming from database.

X - Check

Y - UnCheck

I am trying to do databinding with check box as below.

chkPropAcct.DataBindings.Add("Checked", dt, "PROP_Value")

Can any plz give help me out to do Data binding with check box

Thanks
Whiz

Re: Check Box binding by Alex

Alex
Fri Nov 12 02:04:51 CST 2004

After you populated your data table add a calculated column to it:

C#
dt.Columns.Add("PropBool", typeof(bool), "PROP_Value = 'Y'");
VB
dt.Columns.Add("PropBool", GetType(Boolean), "PROP_Value = 'Y'")

Then bind your check box property to this new column

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Flying Whiz" <flyingwhiz@yahoo.com> wrote in message
news:e54a6824.0411112142.7f7714e2@posting.google.com...
>I have to a bind check box in my application with a value which is
> coming from database.
>
> I have two values which are coming from database.
>
> X - Check
>
> Y - UnCheck
>
> I am trying to do databinding with check box as below.
>
> chkPropAcct.DataBindings.Add("Checked", dt, "PROP_Value")
>
> Can any plz give help me out to do Data binding with check box
>
> Thanks
> Whiz