Go Back   SmartClient Forums > Smart GWT Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 18th Aug 2012, 15:26
Blama Blama is offline
Registered Developer
 
Join Date: Sep 2009
Posts: 153
Default Correct usage of ListGrid.addRowEditorExitHandler() / SC.askforValue after edit

Hi Isomorphic,

I have a question regarding the correct usage of ListGrid.addRowEditorExitHandler(new RowEditorExitHandler()) in a databound ListGrid. As a security measure I want the user to re-enter a value after he changed it in the editable grid and decides to save the change by leaving the row. Therefore I add an addRowEditorExitHandler() and call SC.askforValue from it.

The problem is that the SC.ask call is asynchronous. So in the onRowEditorExit(final RowEditorExitEvent event) I have to call event.cancel() and ListGrid.cancelEditing() because I can't wait for the user to enter his data.
If the user enters the correct data, I have to build the new record on my own from event.getRecord and event.getNewValues() and feed it to the DS manually.

Doing so just doesn't feel right and I'm pretty sure there is a better way to solve the problem. Could you give me some pointers what the suggested approach is for asking the user for confirmation after a ListGrid edit?

Thanks,
Blama
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
ListGrid Group Summary updating on add/remove but not on update? dsammut Smart GWT Technical Q&A 3 9th Apr 2012 21:19
ResultSet correct usage? atomatom Smart GWT Technical Q&A 10 13th Jun 2011 05:56
DataSource correct usage cuthbe Smart GWT Technical Q&A 0 29th Oct 2010 03:48

© 2010,2011 Isomorphic Software. All Rights Reserved