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
2275
Difference between using FieldLayouts and FieldLayout
posted

 

 

When using:

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

as opposed to:

 

<igDP:FieldLayout>
	<igDP:FieldLayout.Fields>
	</igDP:FieldLayout.Fields>
</igDP:FieldLayout>

 

The problem is that converters won't work with the first way of laying out fields as the column is always blank if the type returned by the converter is different than the type the column name maps to, and if you use the second way, you get the following exception:

Can't set the DataSource on a DataPresenter that has items added explicitly through the DataItems collection

We are binding to the SelectedItem in a combobox and we must use the second way of binding to prevent this exception. Currently, we're creating an additional column to match the type, and am writing code in our model to pass this information forward.  I'd prefer to use a converter.  Is there a way to get converters to work using the first way?

Thanks,

Mike Malter

Parents Reply Children
No Data