Farpoint Grid Drag & Drop

Posted by: karthiks2 on 8 September 2017, 1:55 pm EST

  • Posted 8 September 2017, 1:55 pm EST


    I have an business requirement to maintain the Custom Sort
    Order of the records displayed in the Far Point Data Grid by doing “Drag and

    <o:p> </o:p>The work flow is, once the grid is populated with the data
    rows, user would be given an option to “Drag and Drop” any row to rearrange the
    order of the rows and the rearranged order has to be saved in the database. To
    get the rearranged order we might have to refer the dataset (data source of the

    <o:p> </o:p>The issue here is, when we referred to the dataset after
    drag and drop the dragged row is getting deleted from where it is being dragged
    and a new row is getting added @ the end of the dataset <span style="color:red;">(this is how it is currently working for us in the far point grid).</span> Somehow I
    have managed to get the sort order after drag and drop by looping through each row in the dataset.

    <o:p> </o:p>Is there any other way to do Drag and Drop without looping through and deleting
    the row from the dataset?



  • Replied 8 September 2017, 1:55 pm EST

    Hello Vinoth,

    This is the deafult behavior of Drag & Drop, the Row always gets deleted and inserted at a new location.There is no other way to implement this.





  • Replied 8 September 2017, 1:55 pm EST


    You can put code in the RowDragMove event to set e.MoveContent to false, and then the row index mapping in the sheet view will be changed to show the rows in the new order instead of the content of the row being moved to the new location using the IMovable.Add and IMovable.Remove methods.  Then you can get the order of the rows using the SheetView.GetModelRowFromViewRow method, and restore the order next time using SheetView.Models.SetViewRowIndex.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels