i tried already every thing i could think about , and searched a lot for a slution
thats my current XMAL PART of the group header i'm trying to figgure
<ListBox.GroupStyle>
<GroupStyle >
<GroupStyle.HeaderTemplate>
<DataTemplate>
<Grid>
<TextBlock x:Name="GrpDate" FontWeight="Bold" FontSize="14" Text="{Binding Name}" TextAlignment="Right" Grid.Row="0"/>
<TextBlock x:Name="GrpNote" FontWeight="Bold" FontSize="14" Text="{Binding Note }" TextAlignment="Right" Grid.Row="1"/>
<TextBlock x:Name="GrpNote1" FontWeight="Bold" FontSize="14" Text="{Binding orderid }" TextAlignment="Right" Grid.Row="1"/>
</Grid>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ListBox.GroupStyle>
my data is bind to SQL server, and i tried using collection views
CodePudding user response:
The DataContext of a GroupItem has an Items property that contains all grouped items so you should be able to bind to the Note and orderid properties of an item in the group like this:
<TextBlock x:Name="GrpDate" ... Text="{Binding Name}" />
<TextBlock x:Name="GrpNote" ... Text="{Binding Items[0].Note }" />
<TextBlock x:Name="GrpNote1" ... Text="{Binding Items[0].orderid }" />
