I would be great to have an optional dialogue that asks for confirmation if the user is going to remove some records.
An easy way would be to add a simple option, e.g.
A more fine grained way would be to provide a handler that determines, whether a record should really be deleted. The developer then could add some additional information into the dialogue or do some other actions.
Would also be great if a dataRemovedHandler, i.e.
was added at the same time.
see: http://forums.smartclient.com/showthread.php?t=10925
Thanks for your attention & Cheers
fatzopilot
An easy way would be to add a simple option, e.g.
Code:
ListGrid.setCanRemoveRecords(true); ListGrid.setConfirmRemoveRecords(true); //optionally, set dialogue title and message ListGrid.setConfirmRemoveDialogue(String title, String message);
Code:
ListGrid.setDataRemoveHandler(new dataRemoveHandler{ onRemove(Records[] records){ //create message text String message = createDeletionConfirmMessage(records); SC.say("Confirm deletion", message, new BooleanCallback() { @Override public void execute(Boolean value) { return value; } }); )
Code:
ListGrid.setDataRemovedHandler(DataRemovedHandler handler)
see: http://forums.smartclient.com/showthread.php?t=10925
Thanks for your attention & Cheers
fatzopilot