<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://xceed.com/CS/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Xceed DataGrid for WPF</title><link>http://xceed.com/CS/forums/35/ShowForum.aspx</link><description>Community support section for Xceed DataGrid for WPF, Xceed 3D Views for WPF, Xceed Editors for WPF, and Xceed Professional Themes for WPF</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Debug Build: 61120.2)</generator><item><title>Re: How to bind to selected columns in Xceed WPF Grid?</title><link>http://xceed.com/CS/forums/thread/32256.aspx</link><pubDate>Fri, 15 Jun 2012 02:46:31 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:32256</guid><dc:creator>Marc [Xceed]</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/32256.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=35&amp;PostID=32256</wfw:commentRss><description>&lt;p&gt;Hi Pritesh,&lt;/p&gt;&lt;p&gt;In order to match the columns with the properties in your business object, you can do 2 things.&lt;/p&gt;&lt;p&gt;1) Have them automatically generated.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; -&amp;gt; This will display every member from your business object&lt;/p&gt;&lt;p&gt;2) Define the columns you want to display manually&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; -&amp;gt; You have the choice to choose which columns gets displayed to the user&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you choose option 1, then you can set the &lt;a href="http://doc.xceedsoft.com/products/XceedWpfDataGrid/Xceed.Wpf.DataGrid.v4.3%7EXceed.Wpf.DataGrid.DataGridControl%7EAutoCreateColumns.html"&gt;AutoCreateColumns&lt;/a&gt; property to true on the DataGridControl. &lt;/p&gt;&lt;p&gt;If you choose option 2, then you will need to manually define your columns in XAML and provide the FieldName property. The FieldName property corresponds with the name of the members in your BusinessObject, such as: FirstName, LastName, Age, EyeColor, etc.Your XAML should look like this when define your columns:&lt;/p&gt;&lt;p&gt;XAML&lt;/p&gt;&lt;p&gt;----------------&lt;/p&gt;&lt;p&gt;&amp;lt;xcdg:DataGridControl Name="MyDGC" AutoCreateColumns="False" ItemScrollingBehavior="Immediate" Grid.Row="1"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReadOnly="False" ItemsSource="{Binding Source={StaticResource MyPeopleCollectionCollectionView}}" &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:DataGridControl.Columns&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:Column FieldName="FirstName" Title="Column1" /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:Column FieldName="LastName" Title="Column2" /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:Column FieldName="Age" Title="Column3" /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:Column FieldName="EyeColor" Title="Column4" /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:Column FieldName="BirthDate" Title="Column5" /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:Column FieldName="Prefix" Title="Column6" /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xcdg:DataGridControl.Columns&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xcdg:DataGridControl&amp;gt; &lt;br&gt;&lt;/p&gt;&lt;p&gt;---------------- &lt;br&gt;&lt;/p&gt;</description></item><item><title>How to bind to selected columns in Xceed WPF Grid?</title><link>http://xceed.com/CS/forums/thread/32246.aspx</link><pubDate>Wed, 13 Jun 2012 03:49:50 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:32246</guid><dc:creator>Pritesh</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/32246.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=35&amp;PostID=32246</wfw:commentRss><description>&lt;p&gt;How to bind to selected columns in Xceed WPF Grid?&lt;/p&gt;&lt;p&gt;CurrentColumn is the only way I could find to get the selected column.&amp;nbsp; There is no other property on the grid for easy access.&lt;/p&gt;&lt;p&gt;Also, how do we get multiple selected columns to ViewModel in MVVM.&amp;nbsp; Is there a way to get it without using code behind?&lt;/p&gt;&lt;p&gt;Thanks in advance. &lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>