Jump to content

Recommended Posts

Posted

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

  • Administrators
Posted

It is not a bug. There can be any combination of custom JS code in Ext JS events and any sort of malfunction in such user customizations is not a unigui bug. i.e. the bug is in JS script not uniGUI itself.

 

I move the topic to General forum.

Posted

Hi Farshad,

 

I guess you'd changed the cell(field) refreshing mechanism cause this issue, and row refreshing mechanism also been changed which caused the focus been lost after row changed by up/down key as my another post in bug report topic.

Join the conversation

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

Guest
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...