Binding Problem

6 posts, 1 answers
  1. Lior ef
    Lior ef avatar
    49 posts
    Member since:
    Jan 2010

    Posted 23 Feb 2010 Link to this post

    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.
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 24 Feb 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Lior ef
    Lior ef avatar
    49 posts
    Member since:
    Jan 2010

    Posted 25 Feb 2010 Link to this post

    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" 

  5. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 03 Mar 2010 Link to this post

    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.
  6. Lior ef
    Lior ef avatar
    49 posts
    Member since:
    Jan 2010

    Posted 15 Mar 2010 Link to this post

    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.


  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 16 Mar 2010 Link to this post

    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.
Back to Top
UI for WPF is Visual Studio 2017 Ready