Home Forums WPF controls Xceed DataGrid for WPF Independent ItemSources on Single Datagrid

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #22388 |

    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)

    Xceed Support
    Post count: 5658

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.