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

Binding errors on item changing

4 Answers 143 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 03 Feb 2012, 03:33 PM
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

4 Answers, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 09 Nov 2015, 07:34 PM
Was there a resolution for this issue? I may be experiencing the same or similar problem. Thanks
0
Dilyan Traykov
Telerik team
answered on 11 Nov 2015, 05:15 PM
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
0
Chris
Top achievements
Rank 1
answered on 11 Nov 2015, 05:46 PM

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

0
Dilyan Traykov
Telerik team
answered on 12 Nov 2015, 03:44 PM
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
Tags
PropertyGrid
Asked by
Pavel
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or