Calculation of Treegrid Record Properties LfT and RGT in Jqgrid

Source: Internet
Author: User
Tags jqgrid

These two properties are important when calculating a multilevel record, with the following specific rules:

Records A and record e are first-level nodes, B, C is a child node, D is a child of C, and F is a child of E.

Starting from record A, the lft of a is 1, recursively reads all the child nodes of a, and the order is lft assigned. If there are child nodes in the child node (such as C), then continue to traverse the assignment, and when all child node traversal is complete, the order is returned, assigning a value to each node's RGT.

The assignment order for a node is: A (LFT)->b (LFT)->b (RGT)->c (LFT)->d (LFT)->d (RGT)->c (RGT)->a (RGT), the assignment of node E is the same as a

-A lft:1 Rgt:8

-B lft:2 Rgt:3

-C Lft:4 Rgt:7

-D lft:5 Rgt:6

-E Lft:9 Rgt:12

-F Lft:10 rgt:11

Calculation of Treegrid Record Properties LfT and RGT in Jqgrid

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.