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
45
Ignite UI Tree Grid Row Re-ordering
posted

Hi Team,

I am using Ignite UI tree grid in my project and I have a question regarding the Row-reordering.

Our project requirement is we need to show three level hierarchy to the users (ie) Grand parent -> Parent -> skill and we need to enable drag and drop for each level and it should happen only within their respective areas.

  • Drag and Drop will be enabled at all levels - Grandparent, parent and skills.

  • If i drag and drop grandparent, then parent and skills will move along with that,

  • If i drag and drop a parent , then skills move along with that.

  • There should be an option to move skills up and down within a parent.

Currently, in the documentation, it enables row drag and drop for all the rows. can you help me in this ?

Parents
No Data
Reply
  • 2480
    Verified Answer
    Offline posted

    Hi Vignesh,

    Thank you for posting to Infragistics Community!

    From your description I understand that you are already familiar with the IgxTreeGrid Row Drag topic and the Row reordering demo, aren’t you?

    What I can say is that the row reordering sample code already addresses your points for the most part. The requirement about “drag and drop for each level and it should happen only within their respective areas”, means that records could be dropped only among their siblings, that is on the same level, isn’t it? Please, elaborate further if that is not the case.

    So, some custom logic could be introduced to the example so that it restricts dropping based on the dragged and target rows’ data’s ParentIDs. Please, check out this modified version of the demo, where the moveRow method is adjusted to return a boolean indicating whether the move was indeed performed. Whenever the ParentIDs differ, false is returned and in result the dropped event is canceled.

    In case further customizations of the behavior are needed, such as edge cases, they have to be implemented on application level. The same approach could be followed. If you have further questions regarding the drag drop functionality, please, let me know.

    Best regards,
    Bozhidara Pachilova
    Associate Software Developer

Children
No Data