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

PriorityBinding not supported?!

6 Answers 107 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Kristoffer
Top achievements
Rank 1
Kristoffer asked on 29 Oct 2012, 01:08 PM
I have some properties that need some time to execute (e.g. operation via TCP). Hence, it makes sense to bind these properties asynchronously. I cannot get this working using RadPropertyGrid.

<Grid>
  <Grid.DataContext>
    <ObjectDataProvider ObjectType="{x:Type viewModels:MyViewModel}" IsAsynchronous="True" x:Name="myViewModel" />
  </Grid.DataContext>
  <telerik:RadPropertyGrid x:Name="settings" Item="{Binding}" AutoGeneratePropertyDefinitions="False">
    <telerik:RadPropertyGrid.PropertyDefinitions>
      <telerik:PropertyDefinition GroupName="TCP" DisplayName="Status">
        <telerik:PropertyDefinition.Binding>
          <PriorityBinding FallbackValue="Reading...">
            <Binding Path="Status" IsAsync="True" Mode="TwoWay" />
          </PriorityBinding>
        </telerik:PropertyDefinition.Binding>
      </telerik:PropertyDefinition>
    </telerik:RadPropertyGrid.PropertyDefinitions>
  </telerik:RadPropertyGrid>
</Grid>


The code looks right to me but it yields a System.Windows.Markup.XamlParseException:

Additional information: A 'PriorityBinding' cannot be set on the 'Binding' property of type 'PropertyDefinition'. A 'PriorityBinding' can only be set on a DependencyProperty of a DependencyObject.

Either I'm doing it wrong, or your property grid doesn't support this...?

Please help!

6 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 29 Oct 2012, 01:19 PM
Hi,

Currently this is not supported. We will need some time to research the options for a possible implementation. Would it be possible for you to send us a sample project that illustrates your scenario, so that we would be able to test it with it?

All the best,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Kristoffer
Top achievements
Rank 1
answered on 29 Oct 2012, 01:49 PM
I'll create a sample project. Meanwhile, why doesn't the property grid acknowledge the IsAsync property? I think this is the most crucial error here. If I bind my slow property to a TextBlock with IsAsync set to true, it does indeed bind it asynchronously.

So, to test this you only need compare the binding mechanism to this:
<TextBlock>
<TextBlock.Text>
<Binding Path="SlowProperty" IsAsync="True" FallbackValue="Off" />
</TextBlock.Text>
</TextBlock>

When I debug the two (TextBlock vs PropertyGrid) I can see that the latter takes place in Main Thread whereas the first correctly takes place in a worker thread. Please fix this!
0
Ivan Ivanov
Telerik team
answered on 29 Oct 2012, 02:15 PM
Hello,

Basically, we have an internal logic that copies PropertyDefinition's bindings and sets them to the respective editor controls. Unfortunately, both of the mentioned options are not currently supported. We will do our best to include the implementation for our next week's internal build. I will drop a line here to notify you as soon as it is publicly available.

Regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Kristoffer
Top achievements
Rank 1
answered on 03 Dec 2012, 03:38 PM
Just tried your latest version. Still not fixed. Any hope for an update before 2013?
0
Ivan Ivanov
Telerik team
answered on 03 Dec 2012, 03:41 PM
Hi,

Unfortunately we did not manage to push this with the Service pack. We will do our best make it available with the next week's build. Please excuse us for this inconvenience.

All the best,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ivan Ivanov
Telerik team
answered on 10 Dec 2012, 04:27 PM
Hi,

Unfortunately the changeset did not make it to the IB as it has yet to pass the testing process. I will prepare a custom build for you to test it on your side. Please, excuse us for this inconvenience.

Kind regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PropertyGrid
Asked by
Kristoffer
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Kristoffer
Top achievements
Rank 1
Share this question
or