Binding errors on item changing

5 posts, 0 answers
  1. Pavel
    Pavel avatar
    8 posts
    Member since:
    Aug 2011

    Posted 03 Feb 2012 Link to this post

    With xaml
    <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="321*" />
                <ColumnDefinition Width="335*" />
            </Grid.ColumnDefinitions>
            <StackPanel>
                <Button Margin="5" GotFocus="GotFocus">Test</Button>
                <TextBox Margin="5" GotFocus="GotFocus">text</TextBox>
            </StackPanel>
            <telerik:RadPropertyGrid x:Name="pg" Grid.Column="1"
                                     LabelColumnWidth="100" IsGrouped="True" AutoGeneratePropertyDefinitions="True"
                                     telerik:StyleManager.Theme="Vista"/>
        </Grid>
    and code

            private void GotFocus(object sender, RoutedEventArgs e)
            {
                pg.Item = sender;
            }
    if you switch between controls than you see errors like this
    System.Windows.Data Error: 40 : BindingExpression path error: 'ClickMode' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=ClickMode; DataItem='TextBox' (Name=''); target element is 'RadComboBox' (Name=''); target property is 'SelectedValue' (type 'Object')
    System.Windows.Data Error: 40 : BindingExpression path error: 'Command' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=Command; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
    System.Windows.Data Error: 40 : BindingExpression path error: 'CommandParameter' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=CommandParameter; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
    System.Windows.Data Error: 40 : BindingExpression path error: 'CommandTarget' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=CommandTarget; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
    Because the propertygrid do not clear bindings after change selected item.
    The version is 2011.3.1330.40 Dev

  2. Chris
    Chris avatar
    18 posts
    Member since:
    Sep 2014

    Posted 09 Nov 2015 Link to this post

    Was there a resolution for this issue? I may be experiencing the same or similar problem. Thanks
  3. UI for WPF is Visual Studio 2017 Ready
  4. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 11 Nov 2015 Link to this post

    Hello Chris,

    Could you please open a new support ticket, providing a sample project describing the behaviour you're experiencing and the steps which lead to it. You can use this blog post as a reference.

    Regards,
    Dilyan Traykov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  5. Chris
    Chris avatar
    18 posts
    Member since:
    Sep 2014

    Posted 11 Nov 2015 in reply to Dilyan Traykov Link to this post

    Dilyan,

       Unfortunately, I'm not sure I can at this point. I've tried many things over the past few days and I have resolved this issue, however, I'm not sure what changes resolved it. I have tested the original poster's code and it does not produce binding errors.  

     

    Chris

  6. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 12 Nov 2015 Link to this post

    Hello Chris,

    I'm glad that you've resolved your issue. Feel free to contact us if you have any other questions regarding our controls.

    Regards,
    Dilyan Traykov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready