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
2549
Binding DataPresenter to List<DateTime>
posted

Hi all,

I have a problem binding a List<DateTime> to a DataPresenter.

When binding it with AutogenerateFields = true everything works fine, but I want to define the fields in XAML like that (this is created by the tip of Josh Smith [http://blogs.infragistics.com/blogs/josh_smith/archive/2008/10/03/how-to-avoid-typing-fieldlayout-xaml.aspx]:

 

<igDP:XamDataPresenter.FieldLayouts>

 

 

 

 

 

 

<igDP:FieldLayout>

 

 

 

 

<igDP:FieldLayout.Fields>

 

 

 

 

<igDP:Field Name="Value" />

 

 </igDP:FieldLayout.Fields>

 

 

 

 

 

 

</igDP:FieldLayout>

 

 

 

 

 

 

 

 

</igDP:XamDataPresenter.FieldLayouts>

 

 

 The Grid is always empty, until I switch back to AutoGenerateFields = true
Binding is done in code while ThePlan.TheDates is a List<DateTime>:

this

 

 

.dpThePlan.DataSource = ThePlan.TheDates;

 

Any ideas on this one?
Have a great day and best regards
Andy