0 Replies Latest reply on Jan 11, 2008 1:29 PM by dragonmagik

    Datagrid:  Highlight a row

      My scenario:

      I have enabled dragging from a datagrid. In the same datagrid, I have written my own dragEnter and dragDrop methods, that respectively, allow the datagrid to accept the drop, and then updates data in the grid based on where you drop an item. I need my own drag accept and drag drop handlers because not only do I have to change the data in the grid, but I have to make a web service call to update information in a database relating to all of my elements. Each element in the grid has a specific order, and I use drag and drop to update/change the orders of my elements. The dragging and dropping work fine, as does the webservice call, as well as using the method DataGrid.calculateDropIndex(DragEvent) to figure out the index of the target.

      I have also implemented a dragOver handler that, again, calls the DataGrid.calculateDropIndex(DragEvent). This dragOver handler correctly finds the correct drop index and updates dynamically. My question is 'In this handler, is there a way to simply highlight the row of this index returned?" So that the user has a visual representation of where the dragged item will be dropped, or what the new order of the elements will be when dropped.