Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello

 

I have a dataview, and i want to bind it to controls on a winforms application, but when i tried to bind a varchar2 type field(it includes 1,0) to a checkbox i had an error

"String was not recognized as a valid Boolean"

Here is my code

 

 dv = New DataView(ds.Tables(1))

  ChkBoxYDurum.DataBindings.Add("Checked", dv, "STATUS")

  • *Experts*
Posted

On the Checkbox's DataBindings collection, you can add Format and Parse event handlers. Look at the docs on how to set them up. Essentially, Format translates data coming from a DataSource into a format you want for the control and Parse translates data coming from the control into a format the DataSet wants.

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...