Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

No, you can't bind directly to a string variable.

If you have a class with a string property, you could bind to that string.

 

You can bind to almost anything, other than a stand-alone value-type variable (such as a string, DateTime, int, etc.). You can even bind one textbox to another with something like:

textBox2.DataBindings.Add("Text", textBox1, "Text");

 

-Nerseus

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

Ok I'm getting errors. Please help. I modified the code to fit my application, and here is the code:

 

tb1 - the textbox

mformscript.massembly - is the class, its a System.Reflection.Assembly

esTestString - is the property inside the class

------------------

tb1.DataBindings.Add("Text", mFormScript.mAssembly, "esTestString")

-------------------

error code:

 

Additional information: Cannot bind to property or column esTestString on DataSource.

 

---------------

 

Please help.

www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
Posted
Whoops, after a little more research I found the nature of my problem was addressing the instance instead of the assembly. Please disregard last reqest for information - problem completely resovoled with perfection! Thanks so much for the help! If I meet any of you at a MS conference, please allow me to buy you a drink of your choice, so long as you don't drink boiling platinum.
www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!

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