Posted: 9 Jun 2017 9:23 EDT Last activity: 29 Aug 2017 1:31 EDT
Showing different types of multiple fields in a single grid
We would like to show different fields in a single grid. For example: Showing two drop downs, text field in which one drop down having values as A and B and another one is having values as X and Y in the same grid using same column fields like below.
Refer a section from that particular grid. On that inner section, you may add your controls with proper visibility condition. So, whenever the visibility condition satisfies, the appropriate control will get displayed. Now for drop down if you want to have different values, I would suggest bringing the drop down values from a Data Type where there will be a column named category or something . Now, while bringing the possible values for the dropdown, we might use parameterized Data Page to get the values with in turn will call a Report Definition using a parameter. In the parameter we may send the value of the category for which the values will be retrieved from the Data Type.
To display different control for each row I think better to use a custom control to make the solution more dynamic. Source of the grid should have a property to hold the control name and the custom control referred in grid cell should be: <pega:include name='<%=tools.getParamValue("ControlName")%>' type="Rule-HTML-Property">
Control Name should be passed as param while referring that control in the grid as the property.
This will give you flexibility to refer any control name for that row dynamically. This concept is being followed in Pega KYC framework as well or any checklist type section made by Pega.
It is a good approach Swarnendu. But only thing is if it is a drop down or radio, then the we need to use custom dropdown or radio control I think because the possible values need to be populated as well.
if the drop down values are changing based on the other two columns ,simple you can create Datapage and pass those two column values as params to datapage so that no need to of visibility conditions and custom controls.