- Apr 11, 2014
- 1
- 0
- 0
This has been driving me nuts - missing something simple i know - but dont want to waste any more time if possible. have a long list on my page with its data source set thus:
the markup is as follows:
and the templates thus:
the key displays fine, but the grouped items are not showing:
should show something like this -
A2000
001
002
003
A2001
001
002
but I get just
A2000
A2001
A2002
perhaps someone could shed some light on this for me
many thanks
Code:
var result = (from s in App.ViewModel.AllSampleData
join j in App.ViewModel.AllJobData
on s.SampleJobID equals j.JobID
select new { j.JobNumber, s.SampleNumber }).GroupBy(j => j.JobNumber).ToList();
this.lstSamples.ItemsSource = result;
the markup is as follows:
Code:
<phone:LongListSelector
x:Name="lstJobSamplesGrouped"
IsGroupingEnabled="True"
GroupHeaderTemplate="{StaticResource GroupHeaderTemplate}"
ItemTemplate="{StaticResource SampleTemplate}"
LayoutMode="List"
HorizontalAlignment="Left" Margin="10,10,0,10"
Width="436" Tap="lstSamples_Tap"/>
and the templates thus:
Code:
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Key="GroupHeaderTemplate">
<StackPanel VerticalAlignment="Top">
<TextBlock FontWeight="Bold" FontSize="26" Text="{Binding Key}" />
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="SampleTemplate">
<StackPanel VerticalAlignment="Top">
<TextBlock FontWeight="Bold" FontSize="26" Text="{Binding SampleNumber}" />
</StackPanel>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
the key displays fine, but the grouped items are not showing:
should show something like this -
A2000
001
002
003
A2001
001
002
but I get just
A2000
A2001
A2002
perhaps someone could shed some light on this for me
many thanks
