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

Can "IsDropAllowed" be changed into three bools?

1 Answer 28 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 20 May 2011, 04:08 PM
Hello,

Can the "IsDropAllowed" property be changed to represent the three drop positions? For example "IsDropBeforeAllowed", "IsDropAfterAllowed", and "IsDropInsideAllowed"  This would allow me to container bind the properties and handle a significant amount of business logic via binding instead of in code...

For example, if I have a tree representing an org structure chart that contains departments/sudepartments like "Finance" and "Human Resources" and positions like "CEO" and "Sales Rep"...  This tree could be rearranged via drag'n'drop but we would like to restrict dropping inside of a position while not stopping dropping before or after a position...

My binding could look like this...

<telerik:HierarchicalDataTemplate x:Key="itDepartment" ItemsSource="{Binding Children}" ItemTemplateSelector="{StaticResource its}">
   <telerik:ContainerBinding.ContainerBindings>
      <telerik:ContainerBindingCollection>
         <telerik:ContainerBinding PropertyName="IsDropInsideAllowed" Binding="{Binding xxx, FallbackValue=true}" />
         <telerik:ContainerBinding PropertyName="IsDropBeforeAllowed" Binding="{Binding xxx, FallbackValue=true}" />
         <telerik:ContainerBinding PropertyName="IsDropAfterAllowed" Binding="{Binding xxx, FallbackValue=true}" " />
      </telerik:ContainerBindingCollection>
   </telerik:ContainerBinding.ContainerBindings>
   <TextBlock Text="{Binding ElementName}" />
</telerik:HierarchicalDataTemplate>
  
<telerik:HierarchicalDataTemplate x:Key="itPosition" ItemsSource="{Binding Children}" ItemTemplateSelector="{StaticResource its}">
   <telerik:ContainerBinding.ContainerBindings>
      <telerik:ContainerBindingCollection>
         <telerik:ContainerBinding PropertyName="IsDropInsideAllowed" Binding="{Binding xxx, FallbackValue=false}" />
         <telerik:ContainerBinding PropertyName="IsDropBeforeAllowed" Binding="{Binding xxx, FallbackValue=true}" />
         <telerik:ContainerBinding PropertyName="IsDropAfterAllowed" Binding="{Binding xxx, FallbackValue=true}" " />
      </telerik:ContainerBindingCollection>
   </telerik:ContainerBinding.ContainerBindings>
   <TextBlock Text="{Binding ElementName}" />
</telerik:HierarchicalDataTemplate>

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 25 May 2011, 04:10 PM
Hi Rob,

Thank you for your feedback. I added your request as a feature request in our PITS and if the item gathers enough popularity, we will definitely consider implementing it.

I also updated your Telerik account accordingly.

Greetings,
Tina Stancheva
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
TreeView
Asked by
Rob
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or