Is it possible to identify which column is changed in a grid

Posted by Rollbase User on 21-Mar-2013 12:21

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.

All Replies

Posted by Admin on 21-Mar-2013 16:22

Will be addressed time permit.

Posted by Admin on 24-Mar-2013 23:09

Future enhancement

Posted by Admin on 27-Apr-2013 12:58

This enhancement will be released in 4.05 :



client-side API rbf_getGridField(gridNo)

Posted by Admin on 27-Apr-2013 22:51

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

Posted by Admin on 28-Apr-2013 10:15

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.

Posted by Admin on 28-Apr-2013 19:30

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

Posted by Admin on 28-Apr-2013 22:07

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

Posted by Admin on 28-Apr-2013 22:18

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



Posted by Admin on 29-Apr-2013 15:06

There will be a new client-side API method called rbf_getGridField(gridNo) to identify which column has changed.

Posted by Admin on 29-Apr-2013 19:57

Hi Matt,



Thanks for the clarification, was quite confusing for me.



Cheers

Piscoso, Martin

Rollbase PH

Posted by Admin on 04-May-2013 14:01

This has now been released in 4.05.



See the section called Grid Control API in Chapter 7 of Rollbase In Action.

This thread is closed