How to use grid drag and drop with template ?

Is possible to use drag and drop with template ?

I've been searching and I can't find nothing.


Attachment: BlazorApp_fc151281.zip

3 Replies 1 reply marked as answer

MS Monisha Saravanan Syncfusion Team July 26, 2022 09:14 AM UTC

Hi Christian,


Greetings from Syncfusion support.


Query: “Is possible to use drag and drop with template ?”


Yes, it is possible to use drag and drop with ColumnTemplate. To use RowDragandDrop feature you need to enable IsPrimaryKey column to an unique column. Based on the primarykey field RowDragandDrop will be performed. If you don’t need to show the Grid column with primary key field in DataGrid then we suggest you to set visible property as false for the particular Grid column. Kindly refer the attached code snippet and sample for your reference.



  <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" Visible=false IsPrimaryKey=true Width="110"></GridColumn>


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp-1380583217.zip


Kindly get back to us if you have further queries.


Regards,

Monisha


Marked as answer

CP Cristian Plaiu July 26, 2022 01:07 PM UTC

Hi, 


Thanks it works.





MS Monisha Saravanan Syncfusion Team July 27, 2022 04:52 AM UTC

Hi Cristian,


Welcome.


Kindly get back to us if you have further queries. As always we will be happy to help you.


Regards,

Monisha


Loader.
Up arrow icon