Conditional Rendering

Conditional Rendering

Conditional Rendering in AGrid provides a powerful way to enhance the visibility and control of your data. It allows you to highlight columns and rows, disable inline editing, and customize the display of row actions based on specific conditions. Explore the steps to configure Conditional Rendering and its various options.

 

Conditional Rendering Landing Page.png
Conditional Rendering Landing Page

Conditional Rendering Section Details

  • Rule Name: A unique identifier for the rule.

  • Type: Choose between Highlight, Hide/Disable Action, or Disable Inline Edit.

  • Target: Select whether the rule applies to rows, columns, or specific row/list actions.

Create a Conditional Rendering rule.png
Create a Conditional Rendering rule
  • Control Variable: Define conditions based on profiles, permission sets, or permission set groups.

  • Add Filters: Enhance conditional rendering accuracy by adding filters to specify the conditions under which it should be applied.

  • Add Condition: you have the flexibility to add multiple conditions, each with its own set of filters, allowing for precise control over when conditional rendering is triggered.

Conditional Rendering - Section Details 2.png
Conditional Rendering Section Details

Conditional Rendering in AGrid allows you to tailor your list view dynamically, providing a personalized and intuitive user experience.

Conditional Highlighting

Users may need conditional highlighting in list views to easily spot important data based on specific criteria. This feature makes it simpler to identify critical tasks, overdue items, or important dates, improving decision-making and data visibility.

By visually highlighting key information, users can quickly act, leading to more efficient operations. When you need to highlight data in the AGrid List view, such as changing background color, font color, or font styles, select the Type of Conditional Rendering as "Highlight".

Row Highlight

To set up this conditional rendering on the Configuration Page, follow these steps:

  1. Navigate to the Conditional Rendering tab.

  2. Click on the "Add Rule" button and provide a unique name for the rule.

  3. Select the type of rule as "Highlight" and choose the target as "Row".

  4. Set Conditions:
    a. Each Condition can have multiple filters applied using the Filter Logic.
    b. If you are setting up a filter for specific user profiles, permission sets, or permission set groups, select the control variable on the right of the filter.

  5. Enter the Highlight Style details:
    a. Specify details such as background color, font color, and more to define how the highlighted rows will appear.

  6. Click the "Save" button to apply the conditional rendering rule.

Row Highlight Configuration.png
Row Highlight Configuration
Row Highlight Output.png
Row Highlight Output

Column Highlight

To set up this conditional rendering on the Configuration Page, follow these steps:

  1. Navigate to the Conditional Rendering tab.

  2. Click on the "Add Rule" button and provide a unique name for the rule.

  3. Select the type of rule as "Highlight" and choose the target as "Column".

  4. Select which column will be required to highlight under the” Column” field.

  5. Set Conditions:
    a. Each Condition can have multiple filters applied using the Filter Logic.
    b. If you are setting up a filter for specific user profiles, permission sets, or permission set groups, select the control variable on the right of the filter.

  6. Enter the Highlight Style details:
    a. Specify details such as background color, font color, and more to define how the highlighted rows will appear.

  7. Click the "Save" button to apply the conditional rendering rule.  

Column Highlight Configuration.png
Column Highlight Configuration

 

Column Highlight Output.png
Column Highlight Output

Conditional Highlighting for End user side 

The Conditional Highlighting for End User checkbox under Grid Settings allows end users to apply conditional highlighting directly to rows or columns in the list view. If this checkbox is checked, an icon for this feature will be visible at the top of the grid, providing easy access for end users. 

  • End users can highlight rows or columns to mark critical information, such as overdue tasks or priority items, making data analysis and decision-making more intuitive.

  • Users can create multiple rules for conditional highlighting and manage them through the Manage Conditional Highlighting button, which can be seen upon clicking the icon. 

  • This feature allows users to personalize their data views without affecting the admin-level configuration. 

  • Currently, this functionality is only available for Conditional Highlighting.

 

Setup Conditional Highlighting as End users.png
Setup Conditional Highlighting as End users

 

View Conditional Highlighting rules.png
View Conditional Highlighting rules

Hide/Disable Row Action

Admins can hide or disable specific actions based on conditions. For instance, sales managers can disable the "Delete" action for sales reps to prevent accidental deletions. By using this feature, businesses ensure actions are only available when needed, improving data integrity and user experience.

When you need to hide/disable an action in the AGrid List view, select the Type of Conditional Rendering as "Hide/Disable Action".

To set up this conditional rendering on the Configuration Page, follow these steps:

  1. Navigate to the Conditional Rendering tab.

  2. Click on the "Add Rule" button and provide a unique name for the rule.

  3. Select the type of rule as "Hide/Disable Action" and choose the "Action” from the listed.

Disable or Hide Action.png
Disable or Hide Action
  1. Set Conditions:
    a. Each Condition can have multiple filters applied using the Filter Logic.
    b. If you are setting up a filter for specific user profiles, permission sets, or permission set groups, select the control variable on the right of the filter.

  2. Click the "Save" button to apply the conditional rendering rule.

  3. Enable one of the Radio buttons – Hide Action or Disable Action.

  4. Finally, click the "Save" button to apply the conditional rendering rule.

Conditional Rendering - Disable or Hide Action 2.png
Disable/Hide Row Setup

Disabling Inline Edit

Admins may need to restrict inline editing in AGrid List views based on certain conditions or filters. For example, a financial institution might disable inline editing for sensitive financial data to prevent unauthorized modifications.

When you need to disable inline editing in the AGrid List view based on certain conditions or filters, select the Type of Conditional Rendering as "Disable Inline Edit".

Row-Level Disabling 

To set up this conditional rendering on the Configuration Page, follow these steps:

  1. Select the type of rule as "Hide/Disable Action" and choose the target as "Row".

  2. Set Conditions:
    a. Each Condition can have multiple filters applied using the Filter Logic.
    b. If you are setting up a filter for specific user profiles, permission sets, or permission set groups, select the control variable on the right of the filter.

  3. Click the "Save" button to apply the conditional rendering rule.

  4. Finally, click the "Save" button to apply the conditional rendering rule.

Disable Inline Edit Row Setup.png
Disable Inline Edit Row Setup
Disable Inline Edit Row Output.png
Disable Inline Edit Row Output

 

Column – Level Disabling  

To set up this conditional rendering on the Configuration Page, follow these steps:

  1. Select the type of rule as "Hide/Disable Action" and choose the target as "Column".

  2. Under the” Column” field, select which column to Disable Inline Edit for. 

  3. Set Conditions:
    a. Each Condition can have multiple filters applied using the Filter Logic.
    b. If you are setting up a filter for specific user profiles, permission sets, or permission set groups, select the control variable on the right of the filter.

  4. Click the "Save" button to apply the conditional rendering rule.

  5. Finally, click the "Save" button to apply the conditional rendering rule.

Disable Inline Edit Column Setup.png
Disable Inline Edit Column Setup
Disable Inline Edit Column Output.png
Disable Inline Edit Column Output

Preview of Conditional Rendering in Mobile view

 

image-20240307-183120.png
Conditional Rendering in Mobile

Common Notes for Conditional Rendering

  • The order of conditions determines their priority. If three or more conditions are added, only the first condition that matches will apply, and subsequent conditions won't be checked.

  • Additionally, if one ruleset's conditions fail, the system will iterate through subsequent rulesets based on their order until the last ruleset is reached.

Related content