Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
No data in xamdatagrid
posted

I have this grid

<igWPF:XamDataGrid DataSource="{Binding Path=aktiveUgeaviserMedAlles, Mode=OneWayToSource}" HorizontalAlignment="Left" Grid.Row="8" VerticalAlignment="Top" Height="365" Width="1537" Grid.ColumnSpan="13" Grid.RowSpan="3" Name="dgMediePlanlinjer" Margin="46,28,0,0" GroupByAreaLocation="AboveDataArea" BindToSampleData="True">
<igWPF:XamDataGrid.FieldLayouts>
<igWPF:FieldLayout>
<igWPF:FieldLayout.Settings>
<igWPF:FieldLayoutSettings AutoArrangeCells="Never"
AutoGenerateFields="true" />
</igWPF:FieldLayout.Settings>

</igWPF:FieldLayout>
</igWPF:XamDataGrid.FieldLayouts>

</igWPF:XamDataGrid>

and this method to fill in the data

public void setAviserTilGrid(int bladid)
{

var res = aviserDao.GetAllUgeAvisTilGrid(bladid, System.DateTime.Now.Year-1, 1);
aktiveUgeaviserMeds.Add(res);
aktiveUgeaviserMedAlles = new System.Collections.ObjectModel.ObservableCollection<List<AviserTilGrid>>();
aktiveUgeaviserMedAlles.Add(aktiveUgeaviserMeds);


dgMediePlanlinjer.DataSource = aktiveUgeaviserMedAlles ;
// MessageBox.Show("Hej August");

}

I can see that there are data in aktiveUgeaviserMedAlles  but no data in the Grid