Move sub-item up and down within in parent item

Hi, 
I'm using syncfusion-tree-grid version 19.2.60 and angular version 10 in my project.
I'm working on feature in which I need to move sub-task up and down with in its parent task.
I found one of your API reorderRows. using this i'm able to move task up and down.
but i'm not able to move subtasks up and down with in parent task.

here is code i'm using. 

const fromIndexes = data.records.map(val => val.index)
const toIndex = data.action === 'Above' ? (min(fromIndexes) - 1) : (max(fromIndexes) +1)
const action = data.action === 'Above' ? 'above' : 'below';
this.grid.reorderRows(fromIndexes,toIndex,action)


2 Replies

NS Naresh Singh October 12, 2021 02:56 AM UTC

Hi,


I got the solution. thanks



Regards,
Naresh Singh



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team October 12, 2021 11:58 AM UTC

Hi Naresh, 

Thanks for your update. Please get back to us if you are facing any difficulties on this. We are happy to assist you further. 

Regards, 
Farveen sulthana T 


Loader.
Up arrow icon