vbnet Checkbox true or false

  • Thread starter Thread starter Scotty
  • Start date Start date
S

Scotty

Hi

How to databanding checkbox in windowsform

code below does not work
Me.txtFax.DataBindings.Add("text", bsAdressen, "Fax") 'Works fine
Me.txtEmail.DataBindings.Add("text", bsAdressen, "Email") 'Works fine



Me.chkKlant.DataBindings.Add("Checked", bsAdressen, "Klant") 'does not work

Data from mssql server 2005 i try data type bit and tinyint



Many thanks

Scotty
 
Scotty,

Try:

ckbExcludeBase.DataBindings.Add("CheckState", bsClient, "ExcludeBase", True)

Where CheckState is the property you want to bind to, bsclient is the
datasource, and "ExcludeBase" is the datamember in the datasource you want to
bind to the CheckState property. Make sure you leave the True on at the end for
formattingEnabled.

Flomo
--
 
Back
Top