Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
385
How Scroll the rows in the tree grid on drag and drop
posted

Hi,

Is it possible to scroll across the rows by dragging a row from the top of the grid to the bottom of the grid?

Thanks,

Mani

Parents Reply
  • 17590
    Offline posted in reply to Manikanta Vundavalli

    Hello Mani,

    Because of the Tree Grid Virtualization, wich optimizes DOM rendering and memory consumption, IgxTreeGrid renders only what is currently visible in the view port and swapping the displayed data while the user scrolls the data horizontally/vertically. For that reason when a row is dragged and the view port is changed the reference will point to a different row element. In this case the rowList will also return only the elements that are rendered in this current moment into the DOM. What I can suggest is to use the reference of the dragged row parent if it has parent. I crated a sample illustrating my approach for your reference, which you can find here. Please test it on your side and let me know whether you find it helpful.

    Please keep in mind that with the release of the 12.0 version of our product IgxGridRowComponent, IgxTreeGridRowComponent, IgxHierarchicalRowComponent, IgxGridGroupByRowComponent will be no longer exposed in the public API. Public APIs, which used to return an instance of one of the above, then will return objects implementing the new public RowType interface. The new update will migrate most of the uses of IgxGridRowComponent, IgxTreeGridRowComponent, IgxHierarchicalRowComponent, IgxGridGroupByRowComponent , like imports, typings and casts. If a place in your code using any of the above is not migrated, just remove the typing/cast, or change it with RowType. This release is planned to coincide with the release of Angular 12. This should be around the middle of May.

    Please let me know if you need any further assistance with this matter.

     

Children