cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically multiselect rows in a TreeTable

Former Member
0 Kudos

Hi All,

I have a TreeTable with detailsButton, attached to every data row.

My task is: on the lowest level of hierarchy, open OverlayContainer by clicking the detailsButton. Overlay has another button - confirmButton in itself. Clicking on it will select TreeTable row, on which detailsButton has been clicked.

Selected rows of TreeTable shouldn't be deselected, when selecting next row with described procedure.

Problem: after some testing and clicking various child nodes, selection starts working randomly, selecting different parent nodes. Not the node, which detailsButton was pressed. I think, this happening because of expanded nodes which are below selected row. So TreeTable is changing its RowCount.

Here is my code :JS Bin - Collaborative JavaScript Debugging

Any suggestions, please?

Accepted Solutions (1)

Accepted Solutions (1)

former_member182862
Active Contributor
0 Kudos

HI Ivan

Please let me know if this is the answer to your questions

JS Bin - Collaborative JavaScript Debugging

Former Member
0 Kudos

Hi Dennis!

Unfortunately, not...

Here is my testing:

Rock/Rock'n'Roll/Elvis Prestley (correct)

........................../Keith Richards (correct)


ZZZ/subitem3-0 (correct)

ZZZ/subitem3-5 (correct)

ZZZ/subitem3-10 (INCORRECT, ZZZ/subitem3-4 selected instead)

ZZZ/subitem3-16 (INCORRECT, ZZZ/subitem3-6 is selected instead)

Hip-Hop/Old-School/The Surgahill Gang (correct)

Hip-Hop/Gangasta Rap/2pac (INCORRECT, Hip-Hop/Old-School/Grandmaster Flash is selected instead)

former_member182862
Active Contributor
0 Kudos

Can you do some debugging?

It is your task so ...

I think I have given you a starting point.

Thanks

-D

Former Member
0 Kudos

Oh, sure;) The problem was in visibleRowCount=20 parameter. When selecting a row which rowId is higher than visibleRowCount, function stops working correctly. Even selecting a row, which rowId is lower than this parameter after that, didn't fix it.

So, setting parameter to visibleRowCount=50 resulted in successfully working function and I am thank You for this 😃 Best regards!

former_member182862
Active Contributor
0 Kudos

Can you try if this fix the bug

JS Bin - Collaborative JavaScript Debugging

Former Member
0 Kudos

It worked like a charm!

Thanks, Dennis!

Answers (0)