This is a migrated thread and some comments may be shown as answers.

Binding Problem

5 Answers 110 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Lior ef
Top achievements
Rank 1
Lior ef asked on 23 Feb 2010, 09:33 AM
Hi,

i'm using this build - RadControls_for_WPF_2009_3_1314_TRIAL.msi
coding with C# 3.5 on vs2008 and windows xp.

i got a little problem with binding of the control.

i have the following XAML:
<radInput:RadDatePicker Name="myDatePicker" /> 
<Label Content="{Binding ElementName=myDatePicker, Path=SelectedDate}" /> 

the label doesn't show the Selected Date, am i doing something wrong?

i've tried to make the same binding with TextBlock or TextBox and the same problem exists.
i've tried to bind RadTimePicker to these controls with the same Binding syntax and it doesn't work either.

thanks in advance,
Lior.

5 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 24 Feb 2010, 03:06 PM
Hello Lior,

Thank you for contacting us.

There is no problem with the binding. The syntax is right. Attached I am sending you a sample project in which the binding works as expected.
Please give it a try and if you still experience the issue provide us with more details on how we can reproduce the problem.

Feel free to contact us if you have any other questions.

Greetings,
Konstantina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Lior ef
Top achievements
Rank 1
answered on 25 Feb 2010, 12:04 PM
hi Konstantina!
thanks so much for the reply.

it's a little weird.... it does work on your example, but in the original project it doesn't work....

i have this wpf window:
<Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="auto" /> 
            <RowDefinition Height="auto" /> 
            <RowDefinition Height="*" /> 
            <RowDefinition Height="auto" /> 
        </Grid.RowDefinitions> 
         
        <radNav:RadMenu Grid.Row="0"
            <radNav:RadMenuItem Header="Menu Category #1"
                <TextBlock> Menu Item #1 </TextBlock> 
            </radNav:RadMenuItem> 
            <radNav:RadMenuItem Header="Menu Category #2"
                <TextBlock> Menu Item #2</TextBlock> 
            </radNav:RadMenuItem> 
            <radNav:RadMenuItem Header="Menu Category #3"
                <TextBlock> Menu Item #3</TextBlock> 
            </radNav:RadMenuItem> 
        </radNav:RadMenu> 
         
        <ScrollViewer CanContentScroll="False" HorizontalScrollBarVisibility="Auto" 
                      VerticalScrollBarVisibility="Auto" Grid.Row="1"
            <radNav:RadToolBar> 
                <telerik:RadWrapPanel> 
                    <telerik:RadButton>ToolBar Item #1</telerik:RadButton> 
                    <telerik:RadButton>ToolBar Item #2</telerik:RadButton> 
                </telerik:RadWrapPanel> 
                <radNav:RadToolBarSeparator/> 
                <telerik:RadWrapPanel> 
                    <telerik:RadButton>ToolBar Item #3</telerik:RadButton> 
                    <telerik:RadButton>ToolBar Item #4</telerik:RadButton> 
                </telerik:RadWrapPanel> 
            </radNav:RadToolBar> 
        </ScrollViewer> 
         
        <DockPanel Grid.Row="2"
            <telerik:RadExpander ExpandDirection="Left" IsExpanded="True" DockPanel.Dock="Right"
                <ScrollViewer CanContentScroll="False" HorizontalScrollBarVisibility="Auto" 
                              VerticalScrollBarVisibility="Auto"
                    <StackPanel VerticalAlignment="Top" HorizontalAlignment="Left"
                        <telerik:RadButton/> 
                    </StackPanel> 
                </ScrollViewer> 
            </telerik:RadExpander> 
             
            <radDock:RadDocking x:Name="MainDockingControl" FlowDirection="RightToLeft" DockPanel.Dock="Top"
                 
                <radDock:RadDocking.DocumentHost> 
                    <radDock:RadSplitContainer> 
                        <radDock:RadPaneGroup Name="pngMainInDocumentHost" > 
                            <radDock:RadPane Header="pane #1"
                                <StackPanel> 
                                    <telerik:RadButton Name="CreateNewFloat"
                                        Creat New Float Pane 
                                    </telerik:RadButton> 
                                     
                                    <GroupBox> 
                                        <GroupItem> 
                                        <StackPanel> 
                                            <telerik:RadRadioButton>Radio Button #1</telerik:RadRadioButton> 
                                            <telerik:RadRadioButton>Radio Button #1</telerik:RadRadioButton> 
                                            <telerik:RadRadioButton>Radio Button #1</telerik:RadRadioButton> 
                                            <telerik:RadRadioButton>Radio Button #1</telerik:RadRadioButton> 
                                        </StackPanel> 
                                        </GroupItem> 
                                    </GroupBox> 
                                </StackPanel> 
                            </radDock:RadPane> 
                             
                            <radDock:RadPane Header="pane #2"
                                <TextBlock> This Is Pane #2 </TextBlock> 
                            </radDock:RadPane> 
                             
                            <radDock:RadPane Header="pane #3"
                                <TextBlock> This Is Pane #3</TextBlock> 
                            </radDock:RadPane> 
                        </radDock:RadPaneGroup> 
                    </radDock:RadSplitContainer> 
                </radDock:RadDocking.DocumentHost> 
            </radDock:RadDocking> 
             
            <radDock:RadDocking FlowDirection="RightToLeft" DockPanel.Dock="Bottom"
                <radDock:RadDocking.DocumentHost> 
                    <radDock:RadSplitContainer> 
                        <radDock:RadPaneGroup> 
                            <radDock:RadPane Header="Bottom Docked Control - Pane #1"
                                <StackPanel> 
                                    <TextBlock>Bottom Docked Control - Pane #1</TextBlock> 
                                     
                                    <radInput:RadDatePicker Name="myDatePicker" /> 
                                    <Label Content="{Binding ElementName=myDatePicker, Path=SelectedDate}" /> 
                                </StackPanel>                                 
                            </radDock:RadPane> 
 
                            <radDock:RadPane Header="Bottom Docked Control - Pane #2"
                                <TextBlock>Bottom Docked Control - Pane #2</TextBlock> 
                            </radDock:RadPane> 
 
                            <radDock:RadPane Header="Bottom Docked Control - Pane #3"
                                <TextBlock>Bottom Docked Control - Pane #3</TextBlock> 
                            </radDock:RadPane> 
                        </radDock:RadPaneGroup> 
                    </radDock:RadSplitContainer> 
                </radDock:RadDocking.DocumentHost> 
            </radDock:RadDocking> 
        </DockPanel> 
         
        <radNav:RadToolBar Grid.Row="3"
            <telerik:RadSlider Width="100" Value="1" Orientation="Horizontal" HandlesVisibility="Visible" 
                               HorizontalAlignment="Left" Maximum="10" LargeChange="1" Minimum="1" 
                               IsMoveToPointEnabled="False"/> 
            <radNav:RadToolBarSeparator/> 
            <Label Content="Some Content" /> 
            <radNav:RadToolBarSeparator/> 
            <ProgressBar Value="30"/> 
        </radNav:RadToolBar> 
    </Grid> 

and the binding doesn't work....
what could be the problem?

****Edit**
forgot to copy the namespaces:
xmlns:radDock="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" 
    xmlns:radNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:radInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 

0
Accepted
Konstantina
Telerik team
answered on 03 Mar 2010, 07:42 AM
Hi Lior,

Thank you for contacting us and for the provided code snippet.

It seems that there is really a problem with the binding of the DatePicker. We will continue researching the issue and we will get back to you as soon as we have some more information. Meanwhile, you can use the SelectionChanged event of the DatePicker to update the Labels value.

Thank you for your understanding and sorry if that causes you any inconvenience.

Best wishes,
Konstantina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Lior ef
Top achievements
Rank 1
answered on 15 Mar 2010, 09:48 AM
hi Konstantina ,

i don't know if it helps you but the same problem occur with TimePicker as well,
so maybe the problem is common for both.

have a nice day,

Lior.


0
Konstantina
Telerik team
answered on 16 Mar 2010, 05:44 PM
Hello Lior,

Thank you for your cooperation.

We have found the problem and a fix will be available in the internal build at the end of this week. Your Telerik points have been updated for your involvement.

If you have any other questions regarding our controls please feel free to contact us again.

All the best,
Konstantina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
DatePicker
Asked by
Lior ef
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Lior ef
Top achievements
Rank 1
Share this question
or