PDA

View Full Version : cCJGrid ReadOnly but AllowDeleteRow...



Marco
10-Oct-2011, 03:57 AM
Hi

I'm converting a ctlist view into the new cCJGrid class.

The specifics are that its a list of 'Todo iitems'. The user cannot add, insert or delete, so basically the list is read-only.
But when they load one of the items details (triggered from onRowChanged) and do some stuff, the row needs to be removed from the list and the cursor is to move to the next row (or previous if last).

When I set pbReadonly I find that all works, well, except I cannot use Request_delete to delete when the user has processed the item.

I can send a RemoveRow to the dataSource, but that kills the current row position.

What does seem to work as wanted, but is a bit naughty, is


Procedure DeleteRow
Set pbReadOnly to False
Send Request_Delete
Set pbReadOnly to True
End_Procedure




Is this acceptable, or do I go about it the wrong way.

Peter Crook
10-Oct-2011, 11:42 AM
Sounds ok to me. And not a bit naughty.