Client-Side Object Model - Utility Functions

Infragistics.WebUI.UltraWebGridFeedback on this topic...

Client-Side Object Model - Utility Functions

Introduction

The utility functions described here are used by the JavaScript code of the UltraWebGrid Control. The purpose of exposing and documenting them is to allow developers to put as much logic as possible on the client machine in order to obtain gains in both performance and functionality.

Many of these Utility functions are involved with more than simply returning a property value. They are concerned with 'resolving' the property value according to an ordered set of precedance rules. The rules of precedance are straightforward: Check the local value first, if that value is 0, meaning notset, check the next most local value.  This may be the Row, Column, Band or Grid. Repeat the procedure until either a value is found, or the Grid object default is encountered and applied.

HTML ID Formats

Many functions and properties are based on the Id of elements within the page. The Ids of elements is based upon a method of identifying Table and Cell objects uniquely as to owner and position within the Document Object Model, (DOM) of the page. The element most commonly used for funciont calls is the <TD> tag element. The Id of <TD> the tag is made up of several distinct components that are interpreted by the JavaScript in order to identify the position of the <TD> tag or cell within the DOM. The following Id is an example of a typical <TD> tag Id representing a cell:

<td id='UltraWebGrid1rc_3_2_4'>

The components of the Id are delimited by the underscore character. The first component indicates the Id of the owning grid. The next component is the object type identifier: in this case 'rc', indicating that the object is a cell. If the object is a cell, the last component indicates the column number within the band that the cell belongs to. The components between the object type identifier and the last position indicate the row position of the cell within the band hierarchy. In this case the Id indicates the 4th column within the 2nd child row of the 3rd top-level row of the grid. The number of bands references by the Id is equal to the total number of components in the Id minus 2.

The following Id is an example of a typical <TH> tag Id representing a column:

<td id='UltraWebGrid1c_2_4'>

The first component indicates the Id of the owning grid. The next component is the object type identifier: in this case 'c', indicating that the object is a column. The next component is the index of the Band to which the column belongs. And the last component is the index of the column within the band.

Functions

To see a description and example of the function, click on the text of the function.
If you want to see all of the function definitions and examples expanded, click here.
To collapse all definitions and examples, click here.

function igcmbo_getComboById(string comboId)

function igtbl_getElementById(string tagId)

function igtbl_getGridById(string gridId)

function igtbl_getBandById(string cellId)

function igtbl_getColumnById(string cellId)

function igtbl_getRowById(string CellId)

function igtbl_getCellById(string CellId)

function igtbl_getActiveCell(string gridName)

function igtbl_getActiveRow(string gridName)

function igtbl_isCell(string itemName)

function igtbl_isRowLabel(string itemName)

function igtbl_isColumnHeader(string itemName)

function igtbl_getCollapseImage(string gridName, int bandNo)

function igtbl_getExpandImage(string gridName, int bandNo)

function igtbl_getCellClickAction(string gridName, int bandNo)

function igtbl_getSelectTypeCell(string gridName, int bandNo)

function igtbl_getSelectTypeColumn(string gridName, int bandNo)

function igtbl_getSelectTypeRow(string gridName, int bandNo)

function igtbl_getHeaderClickAction(string gridName, int bandNo, int columnNo)

function igtbl_getAllowUpdate(string gridName, int bandNo, int columnNo)

function igtbl_getAllowColSizing(string gridName, int bandNo, int columnNo)

function igtbl_getRowSizing(string gridName, int bandNo, string row)

function igtbl_getRowSelectors(string gridName, int bandNo)

function igtbl_getNullText(string gridName, int bandNo, int columnNo)

function igtbl_getEditCellClass(string gridName, int bandNo)

function igtbl_getFooterClass(string gridName, int bandNo, int columnNo)

function igtbl_getGroupByRowClass(string gridName, int bandNo)

function igtbl_getHeadClass(string gridName, int bandNo, int columnNo)

function igtbl_getRowLabelClass(string gridName, int bandNo)

function igtbl_getSelGroupByRowClass(string gridName, int bandNo)

function igtbl_getSelHeadClass(string gridName, int bandNo, int columnNo)

function igtbl_getSelCellClass(string gridName, int bandNo, int columnNo)

function igtbl_getExpAreaClass(string gridName, int bandNo)

function igtbl_toggleRow(string gridName, string srcRow, boolean expand)

function igtbl_clearSelectionAll(string gridName)

function igtbl_selectCell(string gridName, string cellId, boolean selFlag, boolean fireEvent)

function igtbl_selectRow(string gridName, string rowId, boolean selFlag, boolean fireEvent)

function igtbl_selectColumn(string gridName, string columnId, boolean selFlag, boolean fireEvent)

function igtbl_setActiveCell(string gridName, element cell)

function igtbl_setActiveRow(string gridName, element row)

function igtbl_getInnerText(sourceElement)

<script language=JavaScript> </script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在 GEE 中,当你在使用`ee.ImageCollection.map()`或者`ee.List.map()`函数时,你需要注意其中的函数只能使用 Earth Engine 的 API 函数而不能使用客户端的函数。如果你在函数中使用了客户端的函数,就会出现`A mapped function's arguments cannot be used in client-side operations`错误提示,表示你在客户端操作中使用了映射函数中的参数。 为了解决这个问题,你需要将映射函数中使用的函数改为 Earth Engine API 函数。如果你需要在映射函数中使用某些客户端函数,则可以使用`ee.Algorithms.If()`或者`ee.Image.expression()`等 API 函数来代替。以下是一个例子: ``` // Load an image collection var collection = ee.ImageCollection('COPERNICUS/S2') .filterDate('2019-01-01', '2019-12-31') .filterBounds(geometry); // Define a function to calculate NDVI function calculateNDVI(image) { var ndvi = image.normalizedDifference(['B8', 'B4']); return image.addBands(ndvi.rename('ndvi')); } // Map the function over the collection var ndviCollection = collection.map(calculateNDVI); // Check the result print('NDVI collection:', ndviCollection); ``` 在这个示例中,我们加载了一个 Sentinel-2 的图像集,并定义了一个计算 NDVI 的函数 `calculateNDVI()`。该函数使用了 Earth Engine API 函数 `normalizedDifference()` 和 `addBands()` 来计算 NDVI,并将结果添加到图像的属性中。接着,我们使用 `map()` 函数将 `calculateNDVI()` 函数应用到了图像集中的每张图像上,并将结果保存到了 `ndviCollection` 变量中。最后,我们将结果打印出来。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值