Error in SfTreeGrid Drag and Drop
Hi
Today I have error with Blazor Drag and Drop
RowDropped not fired!, please help
My end: Blazor WASM with Syncfusion 20.1.0.61
Long time ago this was working fine without making any changes.
<SfTreeGrid @ref="tree2"
DataSource="@dataSource"
IdMapping="DEPARTAMENTO_ID"
EnableVirtualization="false"
AllowPaging="true"
ParentIdMapping="PADRE_ID"
AllowExcelExport="true"
Width="auto"
Height="@Height"
RowHeight="20"
TreeColumnIndex="1"
AllowRowDragAndDrop="true">
<TreeGridPageSettings PageSize="30" PageSizeMode="PageSizeMode.All"></TreeGridPageSettings>
<TreeGridSelectionSettings Type="Syncfusion.Blazor.Grids.SelectionType.Single"></TreeGridSelectionSettings>
<TreeGridEvents
OnRowDragStart="OnRowDragStart"
RowDropped="@OnCambiarParent"
TValue="DepartamentoModel"
DataBound="OnRowDataBound">
</TreeGridEvents>
<TreeGridColumns>
<TreeGridColumn HeaderText="Acción" Width="130"/>
<TreeGridColumn Field="DEPARTAMENTO_ID" HeaderText="Id" Width="100px" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Left"
HideAtMedia="(min-width: 800px)"/>
<TreeGridColumn Field="NOMBRE" HeaderText="Departamento" Width="100%"/>
</TreeGridColumns>
</SfTreeGrid>
Hi Jose,
Query#:- RowDropped not fired!, please help
From your provided code example, we found that you have not enabled IsPrimaryKey property which is necessary for performing RowDragandDrop operations(which is the cause of the reported problem).
https://www.syncfusion.com/downloads/support/directtrac/general/ze/Tree_(2)-2031449771.zip
After enabling isPrimaryKey property still faced issue in this version 20.1.61, share us the following details.
- Complete TreeGrid code example.
- Screenshot/Video Demo to replicate the issue.
- If possible replicate it in the above sample and revert us back.
Regards,
Farveen sulthana T
Hi Farveen sulthana T
I just tried the example you sent me and error persists.
I send you a video to show what happens.
Rows change places up or down, but not create nesting.
Also method OnCambiarParent is not fired! IMPORTANT!!!
I simplify code
<SfTreeGrid @ref="tree2"
DataSource="@TreeGridData"
IdMapping="DEPARTAMENTO_ID"
AllowPaging="true"
ParentIdMapping="PADRE_ID"
Width="auto"
Height="300"
RowHeight="20"
TreeColumnIndex="0"
AllowRowDragAndDrop="true">
<TreeGridPageSettings PageSize="10" PageSizeMode="PageSizeMode.All"></TreeGridPageSettings>
<TreeGridSelectionSettings Type="Syncfusion.Blazor.Grids.SelectionType.Single"></TreeGridSelectionSettings>
<TreeGridEvents
OnRowDragStart="OnRowDragStart"
RowDropped="OnCambiarParent"
TValue="WrapData" >
</TreeGridEvents>
<TreeGridColumns>
<TreeGridColumn Field="DEPARTAMENTO_ID" IsPrimaryKey="true" HeaderText="Id" Width="100px"/>
<TreeGridColumn Field="NOMBRE" HeaderText="Departamento" Width="100%"/>
</TreeGridColumns>
</SfTreeGrid>
Code behind its the same.
Please help
Attachment: bandicam_20220629_100713705_46b6fbe3.rar
Hi Jose,
We have checked your reported problem in the attached sample but we are unable to replicate the issue at our end. Refer to the Video Demo attached:-
https://www.syncfusion.com/downloads/support/directtrac/general/ze/Video-1865377545.zip
We suspect that the reported problem may occurs when there is conflict in CSS changes because the border line on performing Draganddrop is not shown in your application. So please ensure that you have referred the CSS with version as like we have provided in our index.html page.
If you are upgrading into latest version from 19.4, we request to follow the breaking Changes that we have implemented. Refer to the documentation link:-
https://blazor.syncfusion.com/documentation/release-notes/20.1.47?type=all#breaking-changes
If already followed, kindly Ignore. So please ensure the steps suggested and after following this still faced issue, Share us the following details.
- Have you applied any external CSS changes to TreeGrid. If yes please share us the details.
- Are you facing the same issue on running the Sample directly or implementing the code snippets in your application.
- If you are facing the issue only on your application, if possible share us the simple issue replicable sample.
Regards,
Farveen sulthana T
Hi Farveen
I just checked your comments about css. I forgot to update these lines in index.html
<link rel='nofollow' href="https://cdn.syncfusion.com/blazor/20.1.61/styles/material.css" rel="stylesheet" />
<script src="https://cdn.syncfusion.com/blazor/20.1.61/syncfusion-blazor.min.js" type="text/javascript"></script>
Now its working fine,
thanks for your support!
Hi Jose,
You're most welcome. Please get back to us if you need any further assistance. We are happy to assist you.
Regards,
Farveen sulthana T
- 10 Replies
- 3 Participants
-
JL jose luis barajas
- Apr 23, 2021 05:53 AM UTC
- Jul 1, 2022 05:09 AM UTC