i have added a link in a selectable grid, when we select that row then the link should be enabled how to configure that
Discussion posts and replies are publicly visible
You probably have a local variable you use to store the selected rows. You just have to check whether the list of selected rows contains that row.
To achieve this, save the selection in a local variable, and then in the showWhen parameter of the link, check if the row is selected or not. You can check this by using the contains() function.Just give it a try ;)
at same time when i select other row both links are disappeared
Then you condition is wrong. Wanna share some code?
a!gridLayout( headerCells: { a!gridLayoutHeaderCell(label: cons!CR_SF_ALL_LABELS[10]), a!gridLayoutHeaderCell(label: "") }, columnConfigs: { a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 2), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 2) }, selectionValue: ri!selected_txt, selectionSaveInto: ri!selected_txt, selectable: true(), rows: a!forEach( items: local!limitsList, expression: a!gridRowLayout( id: fv!item, contents: { a!textField(value: fv!item, readOnly: true()), if( rule!APN_isEmpty(ri!selected_txt), a!textField(readOnly: true()), a!richTextDisplayField( value: a!richTextItem( showWhen: index(ri!selected_txt, fv!item, {}), text: if( local!showLimitData, "Hide Data", "Show Data" ), link: a!dynamicLink( value: not(local!showLimitData), saveInto: if( local!showLimitData = true(), a!save(local!showLimitData, false()), a!save(local!showLimitData, true()) ) ), color: if( local!showLimitData, "#ff0000", "#00ff00" ) ) ) ) } ) ) )
This is not how the index() function works. This is a very powerful and useful function but, i'm afraid, it doesn't do what you seemed to want here.
The good news is the real solution here is probably simpler - you can probably just replace that code with, "ri!selected_txt = fv!item" or something similar to that.