Client API Object Model - Guid Context(3.3)

Grids 网格,以表格的形式显示数据, 网格可以跨越整个form,也可以是form中的一项. 被称为子网格(subgrid).

grid有两种, 一种是read-only grid, 另一种是editable grid.

grid有4中events我们可以使用:

OnLoad 

OnChange

OnRecordSelect

OnSave

其中OnChange 属于data change,  其余3个属于UI Change

我们可以通过以下代码来获取subgrid的数据

function doSomething(executionContext) {
   var formContext = executionContext.getFormContext(); // get the form Context
   var gridContext = formContext.getControl("Contacts"); // get the grid context

   // Perform operations on the subgrid
}

Grid有以下的method可以使用

更多的信息可以参考微软文档

https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/grids

猜你喜欢

转载自www.cnblogs.com/TheMiao/p/12117306.html