Client API grid context
Grids present data in a tabular format. Grids can span the entire form or can be one of the items on a form; the latter are called subgrids.
The Client API grid context object provides reference to a subgrid on a form against which the current code is executed.
Note
Getting the context of a grid (spanning the entire form) is only supported in ribbon commands. More information: Form and grid context in ribbon actions
Use the formContext object to get an instance of the form where the code is executed, and then retrieve the subgrid control on the form. For example, when you know the name of a subgrid control (say Contacts subgrid in the default account form), you can access it using the following code:
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
}
Note
When using gridContext
, calls to getControl()
are not supported.
Related articles
Client API form context
Client API execution context
Understand the Client API object model
Grids and subgrids
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기