I.Overview
There will be a curLGP object in the contentPane under the report preview and decision report preview. It can be used to obtain information such as cells in the page.
II.Reference CurLGP
2.1 Reference in CPT
The user can use contentPane.curLGP in CPT JS script to get the object
2.2 Use Iframe to Embed Reports in Webpages
If the report is embedded in the IFrame of the web page, the curLGP object obtained outside the IFrame is as follows:
var curLGP = document.getElementById('reportFrame').contentWindow.contentPane.curLGP;
III.CurLGP Common Attributes
$container | The jQuery object of the current page |
$sheet_container | The jQuery object of the current sheet |
$editor | The current editing object x-editor |
$fD | The border object when the control is clicked |
$glance | The border object when the mouse passes over the control |
$table | Table object x-table |
currentTDCell | Currently edited cell |
dirtyCell | The edited cell array |
idx | sheet number |
currentPageIndex | The page number in the current sheet |
table_height | Table height |
table_width | Table width |
IV.curLGP Common Methods
4.1 getCellValue(cell)
Description | Get the actual value of the specified cell. |
---|---|
Parameters |
|
Returns | Depend on the value type |
contentPane.curLGP.getCellValue("C2")
4.2 getCellValue(col, row)
Description | Get the actual value of the specified cell. |
---|---|
Parameters |
|
Returns | Depend on the value type |
contentPane.curLGP.getCellValue(2, 1)
4.3 setCellValue(cell, null, value)
Description | Set the actual value of the specified cell. |
---|---|
Parameters |
|
Returns | void |
contentPane.curLGP.setCellValue("C2", null, "test")
4.4 setCellValue(col, row, value)
Description | Set the actual value of the specified cell. |
---|---|
Parameters |
|
Returns | void |
contentPane.curLGP.setCellValue(2, 1, "test")
4.5 _get$TDCell(cell).text()
Description | Get the display value of the specified cell |
---|---|
Parameters |
|
Returns | String |
4.6 _get$TDCell(col, row).text()
Description | Get the display value of the specified cell |
---|---|
Parameters |
|
Returns | String |
4.7 getTDRow(cell)
Description | Get the row number of the specified cell |
---|---|
Parameters |
|
Returns | Number |
contentPane.curLGP.getTDRow(contentPane.curLGP.currentTDCell) // get the row of the current cell
4.8 getTDCol(cell)
Description | Get the column number of the specified cell |
---|---|
Parameters |
|
Returns | Number |
contentPane.curLGP.getTDCol(contentPane.curLGP.currentTDCell) // get the column of the current cell