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
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top