Hi guys!
I have gridview with custom defined style for it's children. But when I set up cellvalidating | rowvalidating event, it's not fire up! Why??
GridView xaml:
P.S. I am not using these events here in this xaml. IS there any work around?
Thank you,
Ihor.
I have gridview with custom defined style for it's children. But when I set up cellvalidating | rowvalidating event, it's not fire up! Why??
GridView xaml:
<
t:RadGridView
Grid.Row
=
"2"
Style
=
"{StaticResource OverrideDefaultGridViewStyle}"
AddingNewDataItem
=
"OnSpecGridViewAddingNewDataItem"
ItemsSource
=
"{Binding Specifications, Mode=TwoWay}"
x:Name
=
"SpecGridView"
>
<
t:RadGridView.Resources
>
<
DataTemplate
x:Key
=
"DraggedItemTemplate"
>
<
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{x:Static p:Resources.AddStandardWindow_TextBlock_Dragging}"
/>
<
TextBlock
Text
=
"{Binding CurrentDraggedItem.SpecificationName}"
FontWeight
=
"Bold"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding CurrentDropPosition}"
FontWeight
=
"Bold"
MinWidth
=
"45"
Foreground
=
"Gray"
/>
<
TextBlock
Text
=
", ("
Foreground
=
"Gray"
/>
<
TextBlock
Text
=
"{Binding CurrentDraggedOverItem.SpecificationName}"
Foreground
=
"Gray"
/>
<
TextBlock
Text
=
")"
Foreground
=
"Gray"
/>
</
StackPanel
>
</
StackPanel
>
</
DataTemplate
>
</
t:RadGridView.Resources
>
<
t:RadGridView.Columns
>
<
t:GridViewColumn
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
t:RadButton
Content
=
"X"
Click
=
"OnDeleteSpecificationButtonClicked"
Style
=
"{StaticResource ButtonCustomStyleRed}"
/>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Header
=
"{x:Static p:Resources.AddStandardWindow_Specifications}"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBox
Style
=
"{StaticResource OverrideDefaultTextBoxStyle}"
Text
=
"{Binding SpecificationName}"
/>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Header
=
"{x:Static p:Resources.AddStandardWindow_Parameter}"
Width
=
"20*"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
t:RadComboBox
Style
=
"{StaticResource ComboBoxStyle}"
ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type t:RadWindow}},
Path
=
DataContext
.Parameters}"
SelectedItem
=
"{Binding Parameter}"
DisplayMemberPath
=
"ParameterName"
/>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Header
=
"{x:Static p:Resources.AddStandardWindow_Nominal}"
Width
=
"20*"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBox
Style
=
"{StaticResource OverrideDefaultTextBoxStyle}"
KeyDown
=
"OnKeyDown"
Text
=
"{Binding Nominal, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
SourceUpdated
=
"OnNominalOrAccuracySourceUpdated"
>
</
TextBox
>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Header
=
"{x:Static p:Resources.AddStandardWindow_Accuracy}"
Width
=
"10*"
Background
=
"#D8E5F0"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBox
Style
=
"{StaticResource OverrideDefaultTextBoxStyle}"
KeyDown
=
"OnKeyDown"
Text="{Binding Accuracy,
NotifyOnSourceUpdated
=
True
,
UpdateSourceTrigger
=
PropertyChanged
}"
SourceUpdated
=
"OnNominalOrAccuracySourceUpdated"
/>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Header
=
"{x:Static p:Resources.AddStandardWindow_Precision}"
Width
=
"10*"
Background
=
"#D8E5F0"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBox
KeyDown
=
"OnKeyDown"
Text
=
"{Binding Presition, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Style
=
"{StaticResource OverrideDefaultTextBoxStyle}"
>
</
TextBox
>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Header
=
"{x:Static p:Resources.AddStandardWindow_Min}"
Width
=
"10*"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBox
Style
=
"{StaticResource OverrideDefaultTextBoxStyle}"
KeyDown
=
"OnKeyDown"
Text
=
"{Binding Minimum, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
SourceUpdated
=
"OnMinOrMaxSourceUpdated"
>
</
TextBox
>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Header
=
"{x:Static p:Resources.AddStandardWindow_Max}"
Width
=
"10*"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBox
Style
=
"{StaticResource OverrideDefaultTextBoxStyle}"
KeyDown
=
"OnKeyDown"
Text
=
"{Binding Maximum, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
SourceUpdated
=
"OnMinOrMaxSourceUpdated"
>
</
TextBox
>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
<
t:GridViewColumn
Width
=
"40"
>
<
t:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
Image
Source
=
"/Images/UpDown.png"
Height
=
"34"
Width
=
"34"
Stretch
=
"None"
/>
</
DataTemplate
>
</
t:GridViewColumn.CellTemplate
>
</
t:GridViewColumn
>
</
t:RadGridView.Columns
>
</
t:RadGridView
>
P.S. I am not using these events here in this xaml. IS there any work around?
Thank you,
Ihor.