We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

What is the relationship between AutoPopulateColumns, MappingName and GridDataVisibleColumn.Binding?

Thread ID:





105716 Nov 15,2012 02:34 PM UTC Nov 30,2012 12:13 PM UTC WPF 1
Tags: GridControl
Hamish Gunn
Asked On November 15, 2012 02:34 PM UTC

I can't get a simple Converter working in a column.  From a previous example I see you use AutoPopulate=False, MappingName=property for column and a Binding to the same property.  Here is my XAML.
<syncfusion:GridDataControl Height="202" HorizontalAlignment="Left" Margin="30,40,0,0" 
Name="gridDataControl1" VerticalAlignment="Top" Width="428" 
ItemsSource="{Binding MduCollection}"
SelectedItem="{Binding MduSelectedItem}" 
AutoPopulateColumns="False" ShowAddNewRow="False" AllowResizeRows="False" AllowDelete="False" AutoPopulateRelations="True">
	<syncfusion:GridDataVisibleColumn MappingName="DataType" IsReadOnly="True" Width="100" Binding="{Binding Path=DataType}"/>
	<syncfusion:GridDataVisibleColumn MappingName="Value" Width="*" Binding="{Binding Path=Value, Converter={StaticResource MduConverter}}"/>

I get a weird effect. When I select a new cell after editing:
1) The last value edited appears in the cell clicked on
2) The converter is not called
3) The property is not updated.

Can you help please (full solution attached).
I have looked at the class documentation but I'd appreciate knowing what the relationship is between the things in this post's subject.


Ravi Shankar B [Syncfusion]
Replied On November 30, 2012 12:13 PM UTC

Hi Hamish,


Thank you for using Syncfusion products.


We have analyzed your query and Please find the response below.




While creating the Visible Columns the GridDataControl get the meta data information (Property Name, DataTypes) about the collection and populate / assign the values based on the meta data information.




While using AutoPopulateColumns as True ,GridDataControl  will get the information from binded underlyingcollection and populate VisibleColumns based on this.




While using AutoPopulateColumns as False ,We want to bind the each property in underlyingcollection to GridDataVisibleColumn. GridDataControl  will populate the VisibleColumn  based on the VisibleColumn .




MappingName property in GridDatavisibleColums is used to bind the underlying collection property to the GridDataVisibleColumn.



This is same behavior like MappingName .It is used to bind the property in the unnderlyingcollection data to the GridDataVisibleColumn.


And you can achieve your requirement by using ValueConverter property in GridDataVisibleColumn. We have modified the sample based on this and it can be download from the following  location.


Modified Sample: ModifiedSample.zip


Note :

Changes done in the Mainwindow.xaml

Changes done in the MduConverter.cs


Please let us know if you have any questions



Ravi Shankar B.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon