3.0.5

Small Change to V2 request

If I have programmed everything thing up right (never a given!) I think a small change to the grid function getCurrentRow() is needed.

If I have no rows in the grid selected - calling getCurrentRow() - say from an event handler on a 'delete row' button returns 0.

If I have row 0 in the grid selected - calling getCurrentRow() - say from an event handler on a 'delete row' button returns 0.

Problem - I cannot tell whether to actaully delete the row - because row 0 is selected or to igonire the key press on the button (as no row has been selected).

Could getCurrentRow() return -1 if no row has been selected ?

(not sure this in the forum for such request - sorry if it is not. Alex - kepp up the good work - really like ActiveWidgets)
Yasdnil
January 30,
If you are checking to get the row that is selected in order to delete it, then current row is not what you want. You want selected row(s). Try using:

obj.getSelectedRows();


This will return an array of currently selected rows, remember there may be more then one. Tehn you can delete the selected row(s).
Jim Hunter
January 30,
Much more elegant - thanks Jim
(like I said - there was no guarantee that my programming was correct!).
Yasdnil
January 31,

This topic is archived.

See also:


Back to support forum