activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

工作流活动

上次更新日期 2026年2月28日

使用网格组件

The Grid component allows you to display an unlimited number of rows and columns. The Grid component also allows you to paginate, filter, sort data, and resize the column width at runtime.

先决条件

已安装UiPath.Form.Activites v2.0.2包或更高版本。

可排序

You can sort data inside columns in ascending or descending order. You sort the data at runtime, in the Form Renderer.

The data in the Grid is displayed in the same order as in the input data table. To sort all data in the Grid click any column header in the Form Renderer.

  • First click sorts the data in ascending order.

  • Second click sorts the data in descending order.

  • Third click restores the original order.

    docs image

可筛选

You can filter data inside each column. You filter the data at runtime, in the Form Renderer.

要筛选列中的数据,请执行以下操作:

  1. 将鼠标悬停在列标题上,然后单击三元组docs image菜单。
  2. 选择筛选操作。
  3. Input a value in the Filter field of the triple bar menu. The input value in the Filter field is a condition for the filtering operation.

根据数据类型,可以使用以下筛选操作:

筛选操作文本数字日期/时间
包含
不包含
等于
不等于
开头为
结尾为
小于
小于或等于
大于
大于或等于
在范围内
空白
非空白
提示:

For all filtering operations applied on Text and Number data, you can add an additional filtering operation, using the operators:

  • AND - displays data if both filter operations are true.
  • OR - displays data if any of the filter operations is true.

可调整大小的列

You can change the width of the columns at runtime, in the Form Renderer. The Column(s) Resizable capability allows you to see the data inside columns better.

要调整列的大小,请将光标悬停在分隔列的边框上,直到双向箭头docs image出现。拖动边框,直至获得所需的列宽。

docs image

分页

You can display the data of the Grid component on pages that are numbered. The Pagination capability also includes setting the number of items per page.

To set the number of items per page: go to the Display tab of the Grid component and choose a value from the Items per page dropdown list. You can choose to display 10, 50 or 100 items per page.

At the bottom of the Form Renderer, at runtime you can view:

  • 您所在页面的行数。
  • 网格中的总行数。
  • 在网格中的总页数中,您所在的页码。

您可以通过单击< >箭头浏览页面,也可以通过单击docs image箭头和最后一页,通过单击docs image箭头。

教程

要使用“网格”组件,请执行以下操作:

  1. Drag and drop a Grid component in the Form Designer.

  2. Go to the Field Key tab and change the Property Name to the input datatable argument from the FormFieldsCollection property of the Create Form activity.

    在本例中,输入 fruitDataTableArg。 数据表参数将 fruit_table.csv 文件中的数据绑定到表单。

  3. In the Display tab, check the capabilities that you want to apply to the Grid component. For this example, check all four boxes: Sortable, Filterable, Column(s) Resizable, and Pagination.

  4. In the Items Per Page field, choose from the dropdown list the number of items per page that you want to display in the form. For this example, choose 10.

  5. 保存组件。

  6. Drag and drop inside the Grid the form components that match the column values inside the input datatable. For this example, drag and drop the following components: one Text Field, one Number, and one Date/Time.

    1. 转到“文本字段”组件的“字段键”选项卡,然后将“属性名称”更改为数据表中保存文本数据的列的名称。对于此示例,将属性名称更改为fruit
    2. 转到“数字”组件的“字段键”选项卡,然后将“属性名称”更改为数据表中保存数字数据的列的名称。在此示例中,将“属性名称”更改为qty
    3. 转到“日期/时间”组件的“字段键”选项卡,然后将“属性名称”更改为数据表中保存日期/时间数据的列的名称。在此示例中,将“属性名称”更改为expdate
    备注:

    请务必保存表单组件,然后再关闭它们!

  7. 保存表单。

  8. Run the workflow and explore the Grid component capabilities.

示例工作流

要查看完整的工作流或供日后参考,请下载XAML 示例

  • 教程
  • 示例工作流

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2026 UiPath。保留所有权利。