Is it possible to databind to a datagridcontrol from multiple sources? I need to populate several combobox columns from different (unsynchronized) sources. Every example I have seen sets the ItemSource of the datagrid, at the grid level, and not at the control/column level.
Imported from legacy forums. Posted by Robert (had 1840 views)
While we do not support this scenario, it might to possible to extend the DataRow/DataCell classes to lookup into alternate sources when they are initializing…
You can do so by overriding the “DataRow.PrepareContainer” and/or “DataCell.Initialize” functions… This would however be a pretty complex customization, and I’m not totally sure it is feasible (I’m providing the idea, just in case you want to tackle the problem, but I never tried that myself).
Alternately, there is another “extensibility” point that could be of some use ( once again, I never tried this scenario, but I give it to you in case you want to try ). When you are specifying the DisplayMemberBinding for a column, you usually leave the “Source” empty (causing the binding to resolve on the DataContext), but you could specify a source…
Imported from legacy forums. Posted by Marcus [Xceed] (had 2961 views)