I have a datasource where a couple of the fields contain semi-colon delimited lists. When present, the lists contain values which pair with each other (one is a list of names, the other is a list of identifiers). All of the other values in my datasource contain single values and can databind to a singular control (DateTimePicker, Textbox, Checkbox, etc.). I'd like for the values in my semi-colon delimited lists to map to a datagridview where each pair of values is a new row.
For example, I'd have a data object, MyDataObject with properties .SecondaryNames = "Company 1; Company 2; Company 3" and .SecondaryIDs = "1; 15; 32" and I'd like that to be databound to a datagridview which would have two columns and three rows, {Company 1, 1}{Company 2, 15}{Company 3, 32}.
Is this at all possible using DataBinding? I'll have to write my own Parse and Format handlers but that's not a big deal, I just can't figure out how you might bind to a DataGridViewColumn. Am I just going to have to write my own Set function instead?
Thanks,
Niko