I have a GridControl bound to an EntityInstantFeedbackDataSource.
All columns make use of the FieldName property to bind:
<dxg:GridColumn FieldName="ContractNumber" >
How do I bind when using a custom converter? I've tried this to bind a property with fieldname 'Type'
<dxg:GridColumn DisplayMemberBinding="{Binding Data.Type, Converter={StaticResource CustomConverter},ConverterParameter=Prm}">
But i get following error:
"System.Windows.Data Error: 40 : BindingExpression path error: 'Type' property not found on 'object' ''RowTypeDescriptor'. BindingExpression:Path=Data.Type; DataItem='EditGridCellData'"
Any ideas?
Thanks in advance
Hi Peter,
It's strange that this property cannot be found. I have tested this approach on my side, and my binding works great - see the attached sample. Please check if Type is a public property - perhaps, you have marked it private, or this is a field, but not a property.
I am looking forward to your results.
Hi
Indeed, your example works as it should work.
But I provide the EntityInstantFeedbackDataSource via code-behind.
<dxg:GridControl x:Name="grid" ItemsSource="{Binding EntityInstantFeedbackDataSource.Data}">
Code:
EntityInstantFeedbackDataSource = new EntityInstantFeedbackDataSource()
{
KeyExpression = "ID",
AreSourceRowsThreadSafe = false,
DataContext = context.Issues,
DesignData = DesignData,
};
grid.ItemsSource = EntityInstantFeedbackDataSource.Data;
And then I still get the error:
BindingExpression path error: 'Subject' property not found on 'object' ''RowTypeDescriptor'
It works for rows which use the FieldName property.
I've attached your modified example.
I something wrong with bindings?
Thank you