Hello,
I'm trying to create a gridLayout component whose components can be hierarchically selected (this means, clicking on a specific row will also select all its subrows, and their respective subrows, all the way til the last hierarchy level).
The thing is, I've assigned an unique id to each row from which I can know its parent rows, but in order to build this selection system, I should be able to loop over all row ids so I know if they have specific parent rows. Hence, my problem is getting all row ids. Is there any way to do it?
Discussion posts and replies are publicly visible
Hello franciscoalfonson0001,
After selecting the particular Row, you can generate the index's for the other rows which you want to be selected automatically.
After generating the index, append it into the "selectionValue" of the grid and then automatically your row will selected.
Hello harshjan,
That's what I'm trying to do, but at the moment I can't seem to make it effective in terms of performance (a lot of integration calls due to the data being external)
So you got the logic working, but it is slow because of web service calls. Do you have a chance to query for multiple items in one call?
I made a test expression rule just for 1 item on the highest level. I guess a couple or ifs and foreachs would let me do it for the rest of elements (it would be slower). Is that what you mean?
I'm now trying to implement the expression rule on the selectionValueSaveInto field (so it's selectionValue:local!selected,
selectionValueSaveInto:a!save(local!selected, rule(local!selected))
This seems to be a good approach.
You will need to find out how the performance is to fetch the data you need. If this is not acceptable, you will need to find a way to improve it.
Specially considering that I'm not even using all the data I want it to work with. I'm doing it on the first 16000 rows of the data to test the waters (I have way more rows than 16000)