We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to bind a textbox to an ArrayList

I have an ArrayList personList consisting of objects of class Person. I need to bind the text value of textBox1 to the Names field of the class Person. textBox1.DataBinding.Add(new Binding("Text",personList,"Person.Name"); I am trying to use ArrayList as a datasource but I get a runtime error "Invalid string corresponding to "Person.Name". What string should I pass to the Binding Constructor? Thanks Mukesh

1 Reply

CB Clay Burch Syncfusion Team May 16, 2002 08:08 PM UTC

Removing the class name from the third argument worked for me. textBox1.DataBindings.Add(new Binding("Text", personList, "Name"));

Live Chat Icon For mobile
Up arrow icon