Jump to content

uniDBGrid refresh bug after editing cell


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:


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
        '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


2. Press 'ABCD' 


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


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



Test case:


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...