Custom Controls:
public class CustomGridView : RadGridView
{
public CustomGridView()
{
}
}
public class RadGridViewCommands
{
}
<
framework:CustomGridView
x:Name
=
"gvCustomerOrder"
ItemsSource
=
"{Binding Orders}"
CanUserDeleteRows
=
"{Binding IsChecked, Mode=TwoWay, ElementName=CanUserDeleteRowsCheckBox}"
IsReadOnly
=
"{Binding IsChecked, Mode=TwoWay, ElementName=IsReadOnlyCheckBox}"
SelectionMode
=
"Extended"
VerticalAlignment
=
"Stretch"
AutoGenerateColumns
=
"False"
>
<
framework:CustomGridView.Columns
>
<
framework:CustomGridViewToggleRowDetailsColumn
/>
<
framework:CustomGridViewSelectColumn
x:Name
=
"gvcSelect"
/>
<
framework:CustomGridViewDataColumn
DataMemberBinding
=
"{Binding Name"
Header
=
"S.no"
/>
</
framework:RTPOGridView.Columns
>
</
framework:RTPOGridView
>
<
Button
Content
=
" Delete"
Style
=
"{StaticResource GreyButtonStyle}"
Command
=
"framework:RadGridViewCommands.Delete"
CommandTarget
=
"{Binding ElementName=gvCustomerOrder}"
/>
But In Run Time it gives an Error:
'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '141' and line position '60'
We are using a custom controls inheriting from telerik base controls.
E.g. In case of datagrid,(Please find attched code Block), Command property is not accesible. It gives an Error.
We use a MVVM Pattern.
Please help on this.