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


    I have two datatables (parent and child) which are related by a column. What I’m trying to do is to fill one column in the datagridcontrol with the info from the second table that is related to the actual row in my grid.

    <xcdg:DataGridControl x:Name=”logReport” ItemsSource=”{Binding Source={StaticResource dataTables}, Path=issue}” AutoCreateColumns=”False” >
    <xcdg:Column FieldName=”uid” Width=”50″ Title=”#” />
    <xcdg:Column FieldName=”links/attach” Width=”100″ TextWrapping=”Wrap” Title=”Links / Attachments” >
    <ListBox Background=”Transparent” BorderBrush=”Transparent” Width=”100″ ItemsSource=”{Binding Source={StaticResource dataTables}, Path=link}” DisplayMemberPath=”name” />

    The problem with my code is that the listbox displays all the data in the child table… Is there a Way to relate this?


    Imported from legacy forums. Posted by Lilian (had 1806 views)

    Xceed Support
    Post count: 5658

    Hi, in your Column’s CellContentTemplate that contains the ListBox, instead of Binding to the ListBox.ItemsSource to the “complete” datatable from your resources, what you should do is bind to the current DataRowView’s relation… (be sure the relation exists).

    So, in your ListBox, the Binding would look like:

    <ListBox ItemsSource=”{Binding <i>relationName</i>}” />

    You can see another example of this in this forum post:

    <a href=”″></a&gt;

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

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