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

工作流活动

上次更新日期 2026年3月6日

滚动浏览数据网格组件

When you create a Data Grid with more than 12 Text Field components inside of it, the Data Grid becomes too tight to display the content. This tutorial demonstrates how to scroll through the Data Grid.

教程

要滚动数据网格组件,请执行以下操作:

  1. Create a CSS file containing two classes for scrolling through the Data Grid and for making the Text Field components wider. The overflow-x: scroll property allows you to scroll through the Data Grid. The min-width: 300px property makes the Text Fields larger, to display the content inside of them.

    将以下代码复制并粘贴到您的 CSS 文件中:

    .my-data-grid
    {
       overflow-x: scroll;
    }
     
     
    .my-data-grid input 
    {
       min-width: 300px;
    }
    .my-data-grid
    {
       overflow-x: scroll;
    }
     
     
    .my-data-grid input 
    {
       min-width: 300px;
    }
    
  2. Go to the LocalCSSFilePath property in the Create Form activity and input the path to the CSS file created (for example, "/file://C:/User/theCssFile.css").

    您还可以将本地 CSS 文件的路径存储为变量,并在“本地 CSS 文件路径”字段中输入变量名称。

  3. 导航至“数据网格”组件的“显示”选项卡。4. 在“自定义 CSS 类”字段中,写入文件中配置的自定义 CSS 类的名称,如下所示: my-data-grid 。这会将 CSS 文件中的数据绑定到您的表单。

    docs image

  4. 保存组件和表单。

示例工作流

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

  • 教程
  • 示例工作流

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新