or
I have replaced some TextBox controls with RadMaskedTextBox controls in a few dialogs.
sample:
| <telerikInput:RadMaskedTextBox Name="somedata" MaskType="Numeric" Mask="" Value="{Binding Source={StaticResource somesource}, Path=somedata}"/> |
After the replacement, the databinding only works for setting the data upon loading. When retrieving the data after closing the dialog, the fields have not changed.
The same databinding using a TextBox works fine.
I have circumvented the problem by manually setting the data upon closing the dialog, but that is obviously not a very good solution.
| SomeObject r = (SomeObject)(((ObjectDataProvider)datagrid.Resources["somesource"]).ObjectInstance); |
| r.somedata = Convert.ToInt16(this.somedata.Value); |
Any suggestions would be most welcome.
Best regards,
Tomas
| <Style x:Key="myGrid" TargetType="{x:Type telerik:RadGridView}"> |
| <Setter Property="Template"> |
| <Setter.Value> |
| <ControlTemplate TargetType="telerik:RadGridView"> |
| <AdornerDecorator> |
| <Border Name="PART_MasterGridContainer" Grid.Row="1" BorderThickness="1" Background="White" BorderBrush="#FF9EB6CE"> |
| <telerik:GridViewItemsControl x:Name="PART_RootItemsControl" |
| IsHierarchyRoot="{TemplateBinding IsHierarchyRoot}" |
| ParentRow="{TemplateBinding ParentRow}" |
| ScrollMode ="{TemplateBinding ScrollMode}" |
| ShowColumnHeaders="{TemplateBinding ShowColumnHeaders}" |
| ShowGroupPanel="{TemplateBinding ShowGroupPanel}" /> |
| </Border> |
| </AdornerDecorator> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter> |
| <Setter Property="ColumnsWidthMode" Value="Fill" /> |
| <Setter Property="Width" Value="Auto" /> |
| <Setter Property="Height" Value="Auto" /> |
| <Setter Property="VerticalGridlinesVisibility" Value="Hidden" /> |
| <Setter Property="telerik:RadGridView.Columns"> |
| <Setter.Value> |
| <telerik:GridViewColumnCollection> |
| <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Image" UniqueName="ImageName" IsGroupable="False" IsSortable="False" Width="50" CellStyle="{StaticResource ImageCell}" /> |
| <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ColA" UniqueName="ColA" IsGroupable="False" IsSortable="False" Width="50" /> |
| <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ColB" UniqueName="ColB" IsGroupable="False" IsSortable="False" Width="50" /> |
| <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ColC" UniqueName="ColC" IsGroupable="False" IsSortable="False" Width="50" /> |
| <telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ColD" UniqueName="ColD" IsGroupable="False" IsSortable="False" Width="50" /> |
| </telerik:GridViewColumnCollection> |
| </Setter.Value> |
| </Setter> |
| </Style> |
