Is it possible to identify which column is changed in a grid when running "onUpdate"-script"? "RowIndex" give us the rowno, but what about the "ColNo"? I have a script that shoud change a coloumnvalue only when an spesific other coloumn is updated.
Will be addressed time permit.
Future enhancement
This enhancement will be released in 4.05 :
client-side API rbf_getGridField(gridNo)
Pavel,
I think he means something like the @@ handle that returns the rowIndex for on grid update functions.
It would be helpful if there was another handle e.g. @@@, to return which specific column was updated.
Additionally, another handle to specify the grid no of the grid being updated would also be very helpful. e.g. @@@@, returns the gridNo of the grid.
See Example below:
on grid update = test(@@, @@@, @@@@);
function test(rowIndex, fieldName, gridNo) {
if (fieldName == 'my_field') {
var my_field = rbf_getGridValue2(gridNo, fieldName, rowIndex);
rbf_setGridValue2(gridNo, 'another_field', rowIndex, 'Field my_field updated');
}
}
fieldName - Return the field name if the value of the field is changed
gridNo - Return the index of the grid where the value was changed
due to the additional parameters, the variable my_field is now dynamically received from the grid.
Stein,
What I personally use right now is the standard "this" of javas
Martin, you have proven yourself that adding too much too complex JavaScript on pages can lead to serious performance problems. So instead just use new API which will be available in 4.05 release.
Pavel,
I don't believe that adding parameters such as:
- @@@, to return which specific column was updated and
- @@@@, returns the gridNo of the grid.
Is really that complex? correct me if i'm wrong in my understanding though.
----------------------------------------
On another note, you're new api, could you give a description of this?
How would this work?
Thanks and hope you can provide info on the inquiries.
Piscoso, Martin
Rollbase PH
return which specific column was updated: this is already done through API
return the gridNo of the grid of being updated: makes sense, let me think about it
For
- return which specific column was updated: this is already done through API
What API is this?
Right now we're using is @@ to get the row that was updated but not the specific column/field that was updated.
Hope you can help
Thanks,
Piscoso, Martin
Rollbase PH
There will be a new client-side API method called rbf_getGridField(gridNo) to identify which column has changed.
Hi Matt,
Thanks for the clarification, was quite confusing for me.
Cheers
Piscoso, Martin
Rollbase PH
This has now been released in 4.05.
See the section called Grid Control API in Chapter 7 of Rollbase In Action.