I'm doing some eccentric stuff right now with a XamDataGrid, but I can't figure out if one of my goals is possible. Basically, the number and types of fields of the grid are not specified until runtime, when a metadata file specifies the type of content being displayed in each column. It's been working really well, until recently when we received a request to add a dropdown control to the choices in the metadata file.
For reasons I'll not get into, the best (and only) way I can think of for this feature to work is to populate one of the grid's fields with a comma separated list of strings, then have each one of these fields serve as that row's ItemSource. I don't actually know if it will work, to be honest, but this is the only thing I can do without throwing out half the code.
So I'd like to know if there's a way to programatically bind a property of all the XamComboEditors in one column to the content of another column, with a 1:1 pairing within that row. For example, I instantiate an UnboundField for each column, adjust its settings, then add it to a FieldLayout. If I have handles on the two fields, is there a way to create a binding like I want?
HI,
Do you want a separate layout per row, based on the selection of the XamComboEditor?
Am I correct?
Sincerely. Matt DSE
No, the layout will be uniform, but I want to know if I can apply a binding between UnboundField objects in a DisplayLayout, which then gets used by a XamDataGrid. I will basically be populating one field with a comma separated list of strings, then I want to bind that value to the ItemSource property of an adjacent XamComboEditor cell, with a converter in place that splits the string into an array.
I know it's a bit wonky, but I don't have any say on how the information is getting published to my grid program, and this was the best plan I could come up with.
Yes you could do this. The DataContext would be the DataRecord ,which would have the cells.
In the converter you could get the unbound cell and convert it to colleciton and bind it to the XamComboEdtior.
Sincerely, Matt Developer Support Engineer
I am following up on this forum thread.
Please let me know if you need further assistance.
Sincerely, Matt DSE