Jump to content

Inserting Alphabetically into a MPTT tree?


msing

Recommended Posts

Hey there,

 

I actually came to the forums because I was neck deep in my code trying to find out why deleting items out of my MPTT tree was causing problems. Funnily enough I couldn't explain my situation without drawing it out in mspaint, and go figure it became clear after a while of drawing and studying my own drawing.

 

Anyway, I realized that there seems to be no obvious way to insert data into a MPTT tree without putting your inserted item as the LAST child of an existing node. I would really like to be able to insert data into my tree in its proper alphabetical position. Of course I can always re-run my function that re-structures the table into MPTT form from the stored parent node info (kept specifically for that reason). But I was hoping I could find a way to do this without running that cursed recursive function.

 

Any insights? Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.