Question


Pegasystems Inc.
CA
Last activity: 3 Feb 2017 7:52 EST
pzGridRadioButton - how to add to repeating Grid layout
Hi,
Can you please let me know how to add pzGridRadioButton to repeating grid layout? I configured one of the column in repeating grid layout as Radio button property and I was looking for pzGridRadioButton control to configure it, but I don't this control listed(in the Display & Validation of the Property rule form).
The below reference from Pega Academy:
The latter Section uses a pzGridRadioButton Control within the Repeating Grid that it displays. When clicked, the pzGridRadioButton changes of the value of the @baseclass.pySelected TrueFalse property to “true”, at the same time changing the values of every other row’s @baseclass.pySelected property to “false”. This pzGridRadioButton is the reason why the D_Itineraries Data Page was set to “Editable”.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


Pegasystems Inc.
US
Ramesh,
I did a little more work with this and found a better control to use: pyRadiobuttonsSelectable. You have to manually select it by using the change control link and then bind it to pySelected as shown below. To find the selected row, you would have a post action data transform or activity that would search for the row where pySelected = true. My preferred function for this is: @Utilities.IndexInPageList("true","pySelected", pagename.pxResults) . With the index, you can start pulling values or copying the page using the index reference.


Pegasystems Inc.
US
IF you are trying to add a radio button to a grid so you can use it to set a row selected (and use it like a radio button list) the LocalRadio control is the control I have been able to use in grids in version 6. I am in the process of verifying that functionality in 7 right now.


Pegasystems Inc.
CA
Thanks Chris.
I am using Pega 7.1.6 version. May be I am missing something, can you please provide a screenshot of your configuration?
Thanks,
Ramesh


Pegasystems Inc.
US
I'm not able to give you a screen shot at the moment, but in your grid add a column. When configuring the cell in the column, select "other" for the control type and then type in "Radio" which should bring up "LocalRadio" as a control type. After selecting the control type, select .pySelected as the associated property for the cell. For the grid itself, on the operations tab, ensure the Inline editing is enabled. That is all you should need to do. If you still are having difficulties, I can take some screenshots tomorrow and attach them to the response.


Pegasystems Inc.
CA
I tried today, but I don't get "LocalRadio" as control type. I believe, I am missing something while configuring. Is it possible to add a column explicitly in repeating grid layout?
Note: I m changing one of the existing property to Radio Button and configured the importance column to Other
Accepted Solution


Pegasystems Inc.
US
Ramesh,
I did a little more work with this and found a better control to use: pyRadiobuttonsSelectable. You have to manually select it by using the change control link and then bind it to pySelected as shown below. To find the selected row, you would have a post action data transform or activity that would search for the row where pySelected = true. My preferred function for this is: @Utilities.IndexInPageList("true","pySelected", pagename.pxResults) . With the index, you can start pulling values or copying the page using the index reference.


Pegasystems Inc.
US
One warning with this solution: if you are using this with a grid that uses pages, you will have to take a different approach because pySelected will only be unique across the currently displayed page. The solution for that requires using a LocalRadio control and calling an activity that loops through the data page and clears out all the other pySelected values. Writing the activity is tricky because you have to get a reference to the step page (for which there is function that can get you the page name) and depending on how fancy you need to be, you may want to pass in your pySelected value as an input param if you are trying to conditionally fire the clearing process.


Pegasystems Inc.
US
I meant to say, using a grid that uses paging.


The activity or the data transform configured on the control will be invoked in the row page context(i.e. if the radio button in 4th row is clicked then the activity / DT will be executed in DataPage.pxResults(4) page). So pxListSubscript property of the primary page should give you the currently selected row. Now the logic has to be written in such a way to reset all other pySelected properties by looping through the entire pagelist.


Pegasystems Inc.
US


Yes. Something like this.


TATA Consultancy Services Ltd
IN
Could you please me in adding the tool tip to this radio option in repeat grid, I know that we don't have option by OOTB, is their any work around please suggest. Thanks you.


TATA Consultancy Services Ltd
IN
Hi Chris_Boone,
Could you please me in adding the tool tip to this radio option in repeat grid, I know that we don't have option by OOTB, is their any work around please suggest. Thanks you.