Hi @all,
Can anybody help me in figuring out how we can apply show when condition for particular rows in an Editable Grid.
My use case is to show all the rows initially but when we select any row, rest of the rows hide out and only that row remains in the grid.
I am attaching an image of the interface of my editable grid:
Highly appreciate your efforts.
Discussion posts and replies are publicly visible
Hi MaryamLNU
When you are selecting something, make sure that you are saving the particular primary key value in a variable, later filter the data where you are querying from.This should solve your issue.Regards,Achuth
In an editable grid, you create rows using a foreach and a!gridRowLayout(). Now, based on conditions, you can either skip the row entirely, or set showWhen of that row to false.
There are several ways of doing it, but the first step would be to store an identifier for the row you want to keep visible. Now in the gridRowLayout's showWhen you can add a condition which is something like this
a!gridRowLayout( showWhen: local!selectedRowIndex=fv!index )
Thanks Achuth_Bilakanti , But we have no primary key, only unique indexes. And we also not querying from anywhere. We are just saving the data initially in a rule input whatever user is inputting in the grid.
Thank you Harshit Bumb (Appyzie) , It solved my problem.Appreciate your help!
Thanks Stefan Helzle for your help, it worked!