Ok, so I'm opening a dataset, and creating a new bindingsource based on a dataset. Once I set the bindingsource, I fill a bunch of text boxes, checkboxes, and combo boxes with data from the bindingsource. I have a small problem though... when data is read in from the database, it reads in not just the data, but any spaces after it. For instance.. lets say I have a field called name in my database, which is of char(50). If the value in name is only 5 characters long, I would recieve a full 50 character string, the value + 45 spaces.
Now this sounds fine, but where I encounter a problem is when I try to bind a combo box to the binding source... because the values in the combo box do not match the ones in the binding source, because of the extra spaces. So, I need something like...
comboBox1.DataBindings.Add("SelectedItem",bindings ource,"Name".trim)
or something?
Does this make any sense whatsoever???