Jump to content

uniDBGrid refresh bug after editing cell


Asiaapollo

Recommended Posts

Development Environment:
Windows 7 Pro - Traditional Chinese (HKSAR) Locale
Delphi XE3 Enterprise - 32/64 bit
Browser Chrome version: 26.0.1410.5 dev-m

uniGUI version: 0.91.0.982

 

I've added below code in uniForm.OnCreate event to start edit when user press any key: (this works well with uniGUI version: 0.90, but it will not correct display edited content <Enter> been pressed)

  with UniDBGrid1 do
    ClientEvents.ExtEvents.add(
        'OnKeypress=function OnKeypress(e)'#13#10+
        '{ var me = '+JSName+','#13#10+
        '  pos  = me.getSelectionModel().getCurrentPosition(),'#13#10+
        '  chrCode = e.getCharCode(),'#13#10+
        '  record = me.store.getAt(pos.row),'#13#10+
        '  colname= me.columns[pos.column].dataIndex,'#13#10+
        '  xplugin = me.getPlugin("uniCellEditor"),'#13#10+
        '  char = String.fromCharCode(chrCode);'#13#10+
        '  record.beginEdit();'#13#10+
        '  record.set(colname, char);'#13#10+
        '  xplugin.startEditByPosition(pos);}');

 

 

 

Steps to reproduce (please refer to attached 4 screen shots):

1. Select a cell

post-1155-0-54048200-1361014846_thumb.jpg

2. Press 'ABCD' 

post-1155-0-29132000-1361014860_thumb.jpg

3. Press <Enter>, the just edited content ("ABCD") disappeared 

post-1155-0-23148100-1361014872_thumb.jpg

4. Press arrow down key or use mouse to click to another row, the just edited content ("ABCD") show up again! 

post-1155-0-72416900-1361014881_thumb.jpg

 

Test case:

Windowless_XE2.zip

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...