drag event

hi,
1. on drag and drop of multiple panels I want to update the positions of all one by one that means I want to get the panel json by id on all the panels present in dashboard.
please help me out.

2. also I am trying to use the onDragStop(args: any) , but I am getting undefined

1 Reply 1 reply marked as answer

SS Sharon Sanchez Selvaraj Syncfusion Team May 19, 2021 02:54 PM UTC

Hi RakhiS, 
 
Thanks for contacting Syncfusion Support. 
 
Query 1:  on drag and drop of multiple panels I want to update the positions of all one by one that means I want to get the panel json by id on all the panels present in dashboard. 
 
To achieve this, you can use serialize() method in Dashboard Layout component. The method helps with the state maintenance when you drag and drop the panels. With this serialize method, you can get the panel settings like, size, position and id of the panels. However, we do not return the content in this method, so you can update the content for the panels with these values. 
 
With the obtained data, you can update the positions of the panels as per your requirement. 
 
Query 2: also I am trying to use the onDragStop(args: any) , but I am getting undefined 
 
To resolve this , the required argument must be mapped to the event as shown in the below code. 
 
  dragStop(argsDragStopArgs) { 
    console.log(args); 
  } 
 
 
 
Refer to the sample. 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
 
Sharon Sanchez S. 


Marked as answer
Loader.
Up arrow icon