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
265
Selection binding works for for a TemplateField "Name" but no other field
posted

Hi,

I am sure I am doing something wrong, but I am not sure where (I am new to WPF). Like in the example provided, I am using the following code to fill my tree, but the selection binding does not work. I see the data record correctly as my selected object but the set on the SelectedObj is never called if my templateField is bound to another property than Name, like I tried in the snippet below with FullName.

Works great if the property is Name...

Any help on how to achieve my display to be FullName and get the selecteed object to set would be greatly appreciated!

Thanks,

Maria

<igDP:XamTreeGrid x:Name="xtgTest" DataSource="{Binding ListOfCatObj}" SelectedDataItem="{Binding SelectedObj, Mode=TwoWay}" >

<igDP:XamTreeGrid.FieldLayoutSettings >

<igDP:FieldLayoutSettings AutoGenerateFields="False" RecordSelectorLocation="None" SelectionTypeRecord="Single" LabelLocation="Hidden"/>

</igDP:XamTreeGrid.FieldLayoutSettings>

<igDP:XamTreeGrid.FieldLayouts>

<igDP:FieldLayout>

<igDP:TemplateField Name="FullName" Width="*" DataType="{x:Type sys:String}">

<!--<igDP:TemplateField Name="Name" Width="*" DataType="{x:Type sys:String}"> THIS works!!!-->

<igDP:TemplateField.DisplayTemplate>

<DataTemplate>

<TextBlock Text="{igEditors:TemplateEditorValueBinding}" />

</DataTemplate>

</igDP:TemplateField.DisplayTemplate>

</igDP:TemplateField>

<igDP:Field Name="ListOfBaseObject" />

</igDP:FieldLayout>

</igDP:XamTreeGrid.FieldLayouts>

</igDP:XamTreeGrid>