Supplying Data

Glossary Item Box

Infragistics(R) NetAdvantage(R) for WPF

Supplying Data

You can supply data to the xamDataGrid™, xamDataCarousel™, or xamDataPresenter™ control by either:


The DataSource property can be set to any object that implements the System.Collections.IEnumerable interface (other than a string), as shown in the XAML below.

<igDP:XamDataGrid DataSource="{Binding Source={StaticResource MyData}}"/> 

The DataItems collection is marked as the "Content" property, so you don't need to specify it explicitly in XAML. Any enclosed objects will automatically get added to this collection, as shown in the XAML below.

<igDP:XamDataGrid> 
	<MYCustomer ... /> 
	<MYCustomer ... /> 
	<MYCustomer ... /> 
	<MYCustomer ... /> 
</igDP:XamDataGrid>


Note: Setting the DataSource property and adding items to the DataItems collection of the same control is not supported and will cause an exception to be thrown.

E-mail your feedback on this topic.

Opinion about our help? Take our survey.

Copyright © 2003-2007 Infragistics, Inc. All rights reserved.

Build Version: 7.1.20071.1320