- Getting Started
- Demo apps
- How To
- Notifications
- Using VB Expressions
- Designing your App
- Events and Rules
- Rule: If-Then-Else
- Rule: Open a Page
- Rule: Open URL
- Rule: Close Pop-Over/Bottom Sheet
- Rule: Show Message
- Rule: Show/Hide Spinner
- Rule: Set Value
- Rule: Start Process
- Rule: Reset Values
- Rule: Upload File to Storage Bucket
- Rule: Download File From Storage Bucket
- Rule: Create Entity Record
- Rule: Update Entity Record
- Rule: Delete Entity Record
- Rule: Add to Queue
- Rule: Trigger workflow
- Rule: Submit Action
- Leveraging RPA in your App
- Leveraging Entities in Your App
- Leveraging Queues in Your App
- Leveraging Media in your app
- Leveraging Actions in your app
- Application Lifecycle Management (ALM)
- UiPath® First-Party Apps
- Basic Troubleshooting Guide
Edit Grid
The Edit Grid control allows you to list, edit, paginate, or search tabular records.
-
Data source - The source of data you want to edit inside the grid. You must reference an object of type AppsDataSource, such as a Data Service entity, or an Orchestrator process.
Once you fetch the data source, the grid automatically detects the data columns. Clicking the More icon of each column navigates you to the following properties:
-
Name - The display name of the column header.
-
Source - The field of the referenced entity.
-
Edit mode view - Determines how to interact with the column:
Edit mode view option
Description
Textbox
Cells in the column behave as a Textbox control.
Datepicker
Cells in the column behave as a Datepicker control.
Checkbox
Cells in the column behave as a Checkbox control.
Dropdown
Cells in the column behave as a Dropdown control.
Multi select
Cells in the column behave as a Multi select control.
-
Hidden - If true, hides the column at runtime.
-
Editable - If false, marks the content of the column as read-only.
-
-
Add new column - Add new columns to your data by clicking the plus "+" icon.
-
Hidden - If true, hides the control at runtime.
-
Editable - If false, marks the control as read-only.
-
Add rows - If true, allows app users to add new rows at runtime. If false, users cannot add new rows.
-
Delete rows - If true, allows app users to delete rows. If false, users cannot delete rows.
-
Search - If true, exposes a built-in search capability.
-
Row selected - Configure what happens when a row is selected.
-
Row added - Configure what happens when a row is added.
-
Row modified - Configure what happens when a row is modified.
-
Row deleted - Configure what happens when a row is deleted.
To access the errors in updating, adding, or editing operations, use the following syntax:
<PageName>.<ControlName>.<RuleName>.Error.Message
<PageName>.<ControlName>.<RuleName>.Error.Message
MainPage.EmployeeDetailsGrid.UpdateEntityRecord.Error.Message
.
-
Control Alignment - By default, inherits the parent alignment. A different alignment other than the parent can be set. To default back to the parent alignment, deselect the overridden options.
Note: The alignment is dependent on the layout selected for the parent (Vertical vs Horizontal). -
Background color - The background color for the Grid header and Grid body.
-
Border - The border for the control. Border Thickness, Color, and Radius can be configured.
-
Font - The font attributes for both the Column header and Column body text, such as font family, size, color, or style (Bold, Italic and Underline). By default, the control inherits the font family of the immediate parent container which is indicated by the keyword "Inherited".
-
Margin - The margin of the control. By default, a margin of 4px is set. Top/Bottom and Left/Right margin properties are combined. These properties can be detached using the Link button at the right side of the Margin section.
-
Size - The width and height of the control. By default, the size is set to
auto
. To set minimum or maximum values, click the three dot icon (...). If the size of the control is smaller than the options, a scroll bar is displayed.
-
SelectedItem (T) - references the item currently selected by the app user
-
DataSource (ListSource of T) - references the data available on the control.
-
NewItem (T) - references the item being created by the Add row option. To be used in the Row added event.
-
Hidden (Boolean) - references the Hidden property of the control.
-
Editable (Boolean) - references the Editable property of the control.
-
AddRows (Boolean) - references the Add Rows property of the control.
-
DeleteRows (Boolean) - references the Delete Rows property of the control.
-
Search (Boolean) - references the Search property of the control.
-
RowIndex (Integer) - references the item in column for update and delete operations.
Use this property for process integration where the entire dataset is in-memory.
.ToListSource
method that converts data from data table to AppsDataSource.
Generically, complex objects can be converted to AppsDataSource by using the syntax:
Processes.ALLDATATYPES.out_datatable.ToListSource()
Processes.ALLDATATYPES.out_datatable.ToListSource()
Make sure you already have a DataTable object in your app.
DataTables objects can be defined as input, output, or input/output arguments of a process. To use these DataTable objects, you need to reference the process where they are used as arguments.
Say you have a process named "Process_A", which has the DataTable objects as arguments:
Input arguments |
in_dt1 |
Output arguments |
out_dt1 |
Input/Output arguments |
inout_dt |
-
Navigate to the General tab of your Edit Grid control.
-
In the Data source field of the control, open the expression editor, and write the following expression:
Processes.<process_name>.<datatable_output_argument>.ToListSource
Processes.<process_name>.<datatable_output_argument>.ToListSourceFor example:
Processes.Process_A.out_dt1.ToListSource
Processes.Process_A.out_dt1.ToListSource -
To perform operations on the DataTable rows, such as adding, editing, or deleting:
-
Make sure the Editable, Add rows, and Delete rows properties are set to true.
-
Switch to the Events tab of the Edit Grid control, then configure the corresponding rules:
-
To add rows, click Create rule for Row added, then use the Set Value rule:
Item To Set
Processes.<process_name>.<datatable_output_parameter>
Processes.<process_name>.<datatable_output_parameter>For example:
Processes.Process_A.out_dt1
Processes.Process_A.out_dt1Value
Processes.<process_name>.<datatable_output_parameter>.AddRow(MainPage.EditGrid.NewItem)
Processes.<process_name>.<datatable_output_parameter>.AddRow(MainPage.EditGrid.NewItem)For example:
Processes.Process_A.out_dt1.AddRow(MainPage.EditGrid.NewItem)
Processes.Process_A.out_dt1.AddRow(MainPage.EditGrid.NewItem) -
To delete rows, click Create rule for Row deleted, then use the Set Value rule:
Item To Set
Processes.<process_name>.<datatable_output_parameter>
Processes.<process_name>.<datatable_output_parameter>For example:
Processes.Process_A.out_dt1
Processes.Process_A.out_dt1Value
Processes.<process_name>.<datatable_output_parameter>.DeleteRowAt(MainPage.EditGrid.RowIndex)
Processes.<process_name>.<datatable_output_parameter>.DeleteRowAt(MainPage.EditGrid.RowIndex)For example:
Processes.Process_A.out_dt1.DeleteRowAt(MainPage.EditGrid.RowIndex)
Processes.Process_A.out_dt1.DeleteRowAt(MainPage.EditGrid.RowIndex) -
To modify rows, click Create rule for Row modified, then use the Set Value rule:
Item To Set
Processes.<process_name>.<datatable_output_parameter>
Processes.<process_name>.<datatable_output_parameter>For example:
Processes.Process_A.out_dt1
Processes.Process_A.out_dt1Value
Processes.<process_name>.<datatable_output_parameter>.UpdateRowAt(MainPage.EditGrid.RowIndex, MainPage.EditGrid.SelectedItem)
Processes.<process_name>.<datatable_output_parameter>.UpdateRowAt(MainPage.EditGrid.RowIndex, MainPage.EditGrid.SelectedItem)For example:
Processes.Process_A.out_dt1.UpdateRowAt(MainPage.EditGrid.RowIndex, MainPage.EditGrid.SelectedItem)
Processes.Process_A.out_dt1.UpdateRowAt(MainPage.EditGrid.RowIndex, MainPage.EditGrid.SelectedItem)
-
-
The following example shows how to bind an entity to an Edit Grid control, then perform CRUD operations using the control and entity-specific rules.
The entity used is called "Employee", and has the following fields:
-
Name
-
Age
-
Date of birth
-
Gender
-
Team
-
Date of Joining
-
IsFullTime
-
Skills
Introduction
This app shows how to work with entities using the Edit Grid control.