|
Queries |
Solutions | |
|
How can we determine which cell/column in the row the drop occured? |
In SfTreeGrid, you can get the column based on column index from the mouse pointer position. Please refer the below code snippet for your reference,
| |
|
Also we would like to fill specific data into the DragOverUI while DragOver a specific cell. How can we achieve this? |
Currently, we are analyzing your requirement of “fill specific data into the DragOverUI while DragOver a specific cel in SfTreeGrid” We will validate and update you the details on or before March 24, 2021.
|
|
<Window.Resources>
<DataTemplate x:Key="dragdroptemplate">
<Border x:Name="border" Width="250"
Background="#ececec"
BorderBrush="#c8c8c8" Height="60"
BorderThickness="1.2">
<Grid VerticalAlignment="Center" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="FirstName : " Grid.Row="0" Grid.Column="0" />
<TextBlock Text="{Binding DraggingNodes[0].Item.FirstName}" Grid.Row="0" Grid.Column="1"/>
<TextBlock Text="LastName : " Grid.Row="1" Grid.Column="0"/>
<TextBlock Text="{Binding DraggingNodes[0].Item.LastName}" Grid.Row="1" Grid.Column="1"/>
</Grid>
</Border>
</DataTemplate>
</Window.Resources>
<syncfusion:SfTreeGrid Name="treeGrid"
AutoGenerateColumns="False"
AllowEditing="True"
ChildPropertyName="ReportsTo"
ParentPropertyName="ID"
SelfRelationRootValue="-1"
RowDragDropTemplate="{StaticResource dragdroptemplate}"
AllowDraggingRows="True"
AllowDrop="True"/ > |
|
Queries |
Solutions | |
|
How can I fill the dragAndDrop popup with information about the target row/cell ? |
Your requirement can be achieved by customize the DragOver event in SfTreeGrid.RowDragDropController. Please refer the below code snippet,
| |
|
disable the pop-up while dragging over specific column in SfTreeGrid |
Your requirement can be achieved by override the ProcessOnDragOver method in TreeGridRowDragDropController in SfTreeGrid. Please refer the below code snippet,
|