EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: fmdano on August 30, 2023, 12:06:15 PM



Title: Expand Tree Grid for Multiple Levels down
Post by: fmdano on August 30, 2023, 12:06:15 PM
Hey all,
SO I have a tree grid. There are multiple rows deep. I need to click a link outside the grid where I pass in a value from the 3rd level down and need to get the grid to refresh and then expand level 1, and level 2 and then expand level 3 and select the row I passed in the id.
I know I can use this code: $(this).treegrid('expand', gridID).treegrid('select', gridIDSel);
if gridID is 1_1 then it will expand the first level and first row. Then inside level 2 gridIDSel: 2_6 then it will select that row.

If I want to highlight 3_22 then how can I expand 1_1 and 2_4 and then 3_20 (id's are examples)?
Do I need to use 3 different expand code lines where I know what the parent id is for the level 3 and then get the grand parent which is level 2 and great-grandparent for level 1, OR is there something where if i pass in a Level 3 id (3_22) to the expand code line, the all the above levels will expand?

Any thoughts on this? thanks...



Title: Re: Expand Tree Grid for Multiple Levels down
Post by: larryclyons on September 07, 2023, 08:11:08 AM
Just bumping it up for notice. Thx jarry