Hi,
we are using Telerik RadDataForm in Our product which is using MVVM Pattern. we want to use our custom Commads and Button for Commit and Cancel and to get this we are referencing RadDataFormStyle to set the command as shown.
And following is the Rad Form Defined on the View. the CommandButtonsVisibility="None" is set to None because we don't want to see the navigation and other controls being used.
The fields are auto generated and the problem is we want to get hold of the ValidationSummay in the View Model (if the condition of a text field etc is not met the Auto-generated validation Summary is Bound to a property in the view Model etc)to show it according to our requirements(i.e. on one of our self created Control to show information or errors etc) .
Is there a way to get hold of the validationSummay in the view Model?.
Thanks,
Jawad.
we are using Telerik RadDataForm in Our product which is using MVVM Pattern. we want to use our custom Commads and Button for Commit and Cancel and to get this we are referencing RadDataFormStyle to set the command as shown.
<
StackPanel
x:Name
=
"PART_FooterPanel"
HorizontalAlignment
=
"Right"
Orientation
=
"Horizontal"
>
<
telerik:RadButton
x:Name
=
"PART_CommitButton"
Content
=
"{TemplateBinding CommitButtonContent}"
Command
=
"{Binding Source={StaticResource DataContextProxy}, Path=Data.UpdateItem}"
InnerCornerRadius
=
"0"
Margin
=
"2,4,4,4"
MinWidth
=
"48"
MinHeight
=
"20"
>
<
telerik:StyleManager.Theme
>
<
telerik:Office_BlackTheme
/>
</
telerik:StyleManager.Theme
>
</
telerik:RadButton
>
<
telerik:RadButton
x:Name
=
"PART_CancelButton"
Content
=
"{TemplateBinding CancelButtonContent}"
Command
=
"{Binding Source={StaticResource DataContextProxy},Path=Data.CancelItemUpdate}"
InnerCornerRadius
=
"0"
Margin
=
"2,4,4,4"
MinWidth
=
"48"
MinHeight
=
"20"
>
<
telerik:StyleManager.Theme
>
<
telerik:Office_BlackTheme
/>
</
telerik:StyleManager.Theme
>
</
telerik:RadButton
>
</
StackPanel
>
And following is the Rad Form Defined on the View. the CommandButtonsVisibility="None" is set to None because we don't want to see the navigation and other controls being used.
<
telerik:RadDataForm
x:Name
=
"DataForm1"
CurrentItem
=
"{Binding CurrentLevelItem,UpdateSourceTrigger=PropertyChanged}"
Style
=
"{StaticResource RadDataFormStyle1}"
DataFieldStyle
=
"{StaticResource DataFormDataFieldStyle1}"
AutoEdit
=
"True"
CommandButtonsVisibility
=
"None"
/>
The fields are auto generated and the problem is we want to get hold of the ValidationSummay in the View Model (if the condition of a text field etc is not met the Auto-generated validation Summary is Bound to a property in the view Model etc)to show it according to our requirements(i.e. on one of our self created Control to show information or errors etc) .
Is there a way to get hold of the validationSummay in the view Model?.
Thanks,
Jawad.