Hi!
I'm creating a project using Prism 4 and have a view where I edit data in a RadDataForm but I'm having problems getting the data bound.
Inside my view I have a RadFluidContentControl that contains a RadTabControl inside the Large-template. The tabcontrol is bound to a list of objects where each object gets a tab.
Inside the ContentTemplate I then have a RadDataForm that should display the data for the object that is shown in the tab.
If I add a TextBlock next to my RadDataForm I can bind it to the object but nothing is showing up in the dataform.
Here is my XAML (sorry that's quite a lot...):
I'm creating a project using Prism 4 and have a view where I edit data in a RadDataForm but I'm having problems getting the data bound.
Inside my view I have a RadFluidContentControl that contains a RadTabControl inside the Large-template. The tabcontrol is bound to a list of objects where each object gets a tab.
Inside the ContentTemplate I then have a RadDataForm that should display the data for the object that is shown in the tab.
If I add a TextBlock next to my RadDataForm I can bind it to the object but nothing is showing up in the dataform.
Here is my XAML (sorry that's quite a lot...):
<
UserControl.Resources
>
<
DataTemplate
x:Key
=
"TabHeaderTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding Namn}"
/>
</
StackPanel
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"HuvudmanFormTemplate"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
telerik:DataFormDataField
Label
=
"Förnamn"
DataMemberBinding
=
"{Binding Namn, Mode=TwoWay}"
/>
<
telerik:DataFormDataField
Label
=
"Efternamn"
Grid.Column
=
"1"
DataMemberBinding
=
"{Binding Efternamn, Mode=TwoWay}"
/>
<
telerik:DataFormDataField
Label
=
"Personnummer"
Grid.Row
=
"1"
DataMemberBinding
=
"{Binding Personnummer, Mode=TwoWay}"
/>
</
Grid
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"TabItemTemplate"
>
<
telerik:RadDataForm
x:Name
=
"HuvudmanDataForm"
ReadOnlyTemplate
=
"{StaticResource HuvudmanFormTemplate}"
EditTemplate
=
"{StaticResource HuvudmanFormTemplate}"
NewItemTemplate
=
"{StaticResource HuvudmanFormTemplate}"
AutoGenerateFields
=
"False"
/>
</
DataTemplate
>
</
UserControl.Resources
>
<
telerik:RadFluidContentControl
x:Name
=
"FluidContentControl"
ContentChangeMode
=
"Manual"
State
=
"Large"
>
<
telerik:RadFluidContentControl.SmallContent
>
<
StackPanel
Orientation
=
"Vertical"
>
<
TextBlock
Text
=
"Huvudmän"
Margin
=
"2"
FontWeight
=
"Bold"
/>
<
ItemsControl
ItemsSource
=
"{Binding Akt.Huvudmän}"
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Namn}"
Margin
=
"2, 0, 2, 2"
/>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
</
ItemsControl
>
</
StackPanel
>
</
telerik:RadFluidContentControl.SmallContent
>
<
telerik:RadFluidContentControl.LargeContent
>
<
telerik:RadTabControl
ItemTemplate
=
"{StaticResource TabHeaderTemplate}"
ContentTemplate
=
"{StaticResource TabItemTemplate}"
ItemsSource
=
"{Binding Akt.Huvudmän}"
>
</
telerik:RadTabControl
>
</
telerik:RadFluidContentControl.LargeContent
>
</
telerik:RadFluidContentControl
>