|
|
纯真的显示器 · Mxgraph一些基础功能 | 我的技术博客· 3 月前 · |
|
|
不羁的电影票 · Determinants of ...· 2 周前 · |
|
|
越狱的茶叶 · r(132) too few quotes ...· 7 月前 · |
|
|
乖乖的蘑菇 · 如何预防粉尘爆炸-临湘市政府网· 1 年前 · |
|
|
潇洒的牙膏 · shell中把grep的结果赋值给变量 ...· 1 年前 · |
|
|
耍酷的企鹅 · 俄白总统在索契讨论瑞安客机紧急降落事件· 1 年前 · |
|
|
神勇威武的苦咖啡 · Android混淆——了解这些就够了 - 简书· 2 年前 · |
| cell |
| https://www.outsystems.com/forums/discussion/56837/outsystems-data-grid-web-using-setcellvalue-results-in-an-error/ |
|
|
发财的山羊
2 年前 |
|
|
纯真的显示器 · Mxgraph一些基础功能 | 我的技术博客 3 月前 |
|
|
不羁的电影票 · Determinants of B-Cell Compartment Hyperactivation in European Adolescents Living With Perinatally A 2 周前 |
|
|
乖乖的蘑菇 · 如何预防粉尘爆炸-临湘市政府网 1 年前 |
|
|
耍酷的企鹅 · 俄白总统在索契讨论瑞安客机紧急降落事件 1 年前 |
|
|
神勇威武的苦咖啡 · Android混淆——了解这些就够了 - 简书 2 年前 |
wrote:
Yuichiro san,
Why you need using "setCellValue" function? can you take a screenshot error?
I tried debug but it was not called.
Usually I use "setCellData" only.
Regards.
thank you for your reply.
I used GridOS.ExternalAPI.setCellValue in GridFramework's External API's and used it.
External calls seemed to be appropriate.
In this process, setCellData is also called, but there are several processes that seem important before and after.
Is it OK to just call setCellData?
wrote:
wrote:
Yuichiro san,
Why you need using "setCellValue" function? can you take a screenshot error?
I tried debug but it was not called.
Usually I use "setCellData" only.
Regards.
thank you for your reply.
I used GridOS.ExternalAPI.setCellValue in GridFramework's External API's and used it.
External calls seemed to be appropriate.
In this process, setCellData is also called, but there are several processes that seem important before and after.
Is it OK to just call setCellData?
Yuichiro san,
>>In this process, setCellData is also called, but there are several processes that seem important before and after.
I can see "setCellValue" function is like end user input:
1. Mark dirty cell with old and new value.
2. Create undo/redo for this cell. (I think this part for End user, when manual input)
3. Set value of the cell.
4. Validate the cell.
And I need to differentiate between user input and automatic calculation or dynamic cell, so I don't use "setCellValue" function.
I think It OK if you can control the cell.
Regards.
Hi Yuichiro ,
The problem is a missing new word to assign an instance of GridEditAction.
You can redefine the setCellValue function on your side in the meanwhile, before it get fixed, by including this script in the JavaScript of your WebBlock/Screen:
GridOS.ExternalAPI.setCellValue = function(row, col, value, gridId) {
var gObj = GridOS.ComponentUtils.getGridObjectById(gridId);
var _flexGrid = gObj.grid;
var _panel = _flexGrid;
var _dataItem = _flexGrid.rows[row].dataItem;
var _binding;
var _col;
if (typeof(col) === 'number') {
_binding = _flexGrid.columns[col].binding;
_col = col;
}
else {
_binding = col;
_col = _flexGrid.columns.getColumn(_binding).index;
}
var _cellEvent = {
panel: _panel,
row: row,
col: _col,
os_dataItem: _dataItem,
os_binding: _binding
};
var undoStackActive = gObj.outsystemsOptions.undoStackActive;
if (undoStackActive) {
if (gObj.undoStack._openAction !== undefined) { // Check if is old undoStack
gObj.undoStack._openAction(new GridEditAction(_flexGrid, _cellEvent)); // From UndoStack: add to the stack the current state, before changing the value
}
else { // If is the new undoStack
gObj.undoStack._pendingAction = new GridEditAction(_flexGrid, _cellEvent); // From UndoStack: add to the stack the current state, before changing the value
}
}
// Before set the value of the cell get the current value, the old value
GridOS.EditEngine.onBeforeEditing(gObj.gridId, _flexGrid, _cellEvent);
// Set value of the cell
_flexGrid.cells.setCellData(row, _col, value);
// Mark as dirty if the new value set is different than the old
GridOS.EditEngine.setDirtyCell(gObj.gridId, _flexGrid, _cellEvent);
// Validate the cell
GridOS.EditEngine.validateErrors(_flexGrid, _cellEvent, gObj);
if (undoStackActive) {
if (gObj.undoStack._openAction !== undefined) { // Check if is old undoStack
gObj.undoStack._closePendingAction(); // From UndoStack: add to the stack the state after changing the value
}
else { // If is the new undoStack
if (gObj.undoStack._pendingAction instanceof GridEditAction) {
gObj.undoStack.pushPendingAction();
} // From UndoStack: add to the stack the state after changing the value
}
}
};
hi, Huyen IT,
Certainly, if you only want to rewrite the value of Cell, I think that there is no problem with "setCellValue".
I want to set the Dirty so that I know that the value has changed.
In actual implementation, Notify of Popup is set from Action.
hi, Pedro Romãozinho,
I understand that there is not enough instance quota.
Before the response, the process was proceeding on the premise that an instance was created, but is there any effect on other things?
wrote:
hi, Huyen IT,
Certainly, if you only want to rewrite the value of Cell, I think that there is no problem with "setCellValue".
I want to set the Dirty so that I know that the value has changed.
In actual implementation, Notify of Popup is set from Action.
hi, Pedro Romãozinho,
I understand that there is not enough instance quota.
Before the response, the process was proceeding on the premise that an instance was created, but is there any effect on other things?
Yuichiro san,
Maybe requirement of each screen is different. I always process "Cell-Dirty" manually.
>>The target Cell may be editable, so I want it to work properly.
>>Do you have any good ideas?
Can you explain in more detail?
wrote:
wrote:
hi, Huyen IT,
Certainly, if you only want to rewrite the value of Cell, I think that there is no problem with "setCellValue".
I want to set the Dirty so that I know that the value has changed.
In actual implementation, Notify of Popup is set from Action.
hi, Pedro Romãozinho,
I understand that there is not enough instance quota.
Before the response, the process was proceeding on the premise that an instance was created, but is there any effect on other things?
Yuichiro san,
Maybe requirement of each screen is different. I always process "Cell-Dirty" manually.
>>The target Cell may be editable, so I want it to work properly.
>>Do you have any good ideas?
Can you explain in more detail?
I am currently experimenting with using "setCellData".
It is not working well.
Sorry, can I get a sample OML?
wrote:
wrote:
wrote:
hi, Huyen IT,
Certainly, if you only want to rewrite the value of Cell, I think that there is no problem with "setCellValue".
I want to set the Dirty so that I know that the value has changed.
In actual implementation, Notify of Popup is set from Action.
hi, Pedro Romãozinho,
I understand that there is not enough instance quota.
Before the response, the process was proceeding on the premise that an instance was created, but is there any effect on other things?
Yuichiro san,
Maybe requirement of each screen is different. I always process "Cell-Dirty" manually.
>>The target Cell may be editable, so I want it to work properly.
>>Do you have any good ideas?
Can you explain in more detail?
I am currently experimenting with using "setCellData".
It is not working well.
Sorry, can I get a sample OML?
Sorry, I don't have any sample for this.
But "Cell-Dirty" is very important to process "user input data", and i need distinct with "auto fill data".
Moreover "setCellValue" has a lot of processing and I feel PG will be slow if using it.
Regards.
wrote:
wrote:
wrote:
wrote:
hi, Huyen IT,
Certainly, if you only want to rewrite the value of Cell, I think that there is no problem with "setCellValue".
I want to set the Dirty so that I know that the value has changed.
In actual implementation, Notify of Popup is set from Action.
hi, Pedro Romãozinho,
I understand that there is not enough instance quota.
Before the response, the process was proceeding on the premise that an instance was created, but is there any effect on other things?
Yuichiro san,
Maybe requirement of each screen is different. I always process "Cell-Dirty" manually.
>>The target Cell may be editable, so I want it to work properly.
>>Do you have any good ideas?
Can you explain in more detail?
I am currently experimenting with using "setCellData".
It is not working well.
Sorry, can I get a sample OML?
Sorry, I don't have any sample for this.
But "Cell-Dirty" is very important to process "user input data", and i need distinct with "auto fill data".
Moreover "setCellValue" has a lot of processing and I feel PG will be slow if using it.
Regards.
Huyen IT san,
By using setCellData, the value was successfully updated.
In addition, the target data could be updated normally by fetching rows using os_RowId.
Thank you very much.
I tried to create an instance, but Undo does not work.
The target Cell may be editable, so I want it to work properly.
Do you have any good ideas?
By the way, it works normally when SendDefaultValues of REST API is set to Yes.
Is this fix correct?
Try this sample which implements the setCellValue