Home Forums WPF controls Xceed DataGrid for WPF Sharing Data between two DataGrids

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24047 |

    Hi
    we would like to have 2 datagrids, one showing a list of records from the database and the other showing details about the selected record. Me manage to display data in the list but don’t succeed with the details. Of course the data should be synchronized between details and grid and should be updatable.
    Please advise
    Arthur

    Imported from legacy forums. Posted by Arthur (had 414 views)

    User (Old forums)
    Member
    Post count: 23064

    You need to manage the update yourself
    when the current item changes in the master grid
    then fill the data to the details grid/grid’s datasource

    Imported from legacy forums. Posted by MiddleTommy (had 267 views)

    Xceed Support
    Member
    Post count: 5658

    If you are using ADO.NET:

    <DataGridControl x:Name=”masterGrid” ItemsSource=”… Binding to the Master DataView…” />
    <DataGridControl x:Name=”detailGrid” ItemSource=”{Binding ElementName=masterGrid, Path=CurrentItem.RelationName}” />

    Where RelationName identifies the relation: e.g. OrdersOrderDetails

    Note: This will work only when masterGrid is bound directly to the DataView (not through a DataGridCollectionView or DataGridCollectionViewSource).

    Imported from legacy forums. Posted by Marcus [Xceed] (had 3133 views)

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