Jump to content

Recommended Posts

Posted

in a editing TUniDBGrid i click on a cell and i can enter a value

Then i click on the cell above BUT i have to click another time to enter a value

how to avoid double-clicking to enter a value in an editable cell ?

Posted

ClicksToEdit was 2

i set ClicksToEdit = 1 BUT the behavior is still the same :

when i click on another editing cell it is necessary to click again to enter a value (the first click only set the focus on the cell)

Posted

i click on the yellow cell

image.png.095ad4b7ea0af8b5efadc313a7100fe1.png

the cell is in editing mode 

image.png.f49df11ecb3203dfefab0920e1991e1a.png

so i can change the value to 20 => Great 

image.png.c9d9d2f265684df007df021084a17233.png

then i click on the cell below (which contains 35)

image.png.a4b71463b23f444c69a2b64beb66b851.png

the yellow cell get the focus but i have to click again to change the value => it is the concern

With uniGUI 0.99.96.1318 when i click on the cell below i can directly change the value without clicking again

  • Administrators
Posted
34 minutes ago, Farshad Mohajeri said:

Changing value a of cell may force grid to reload data or refresh the edited row. It will force grid to cancel any active editors.

That said, I am investigating the issue more closely.

Posted

when i click on cell on different rows (on the same column) the reload data occurs one out of two times. Therefore clicking on the cell edits the cell every other time

Posted

when i use the new property HyperGrid with this setting :

  • HyperGridEnabled=true 
  • HyperGridOptions hgMonitorChanges=true, hgHideDirtyMark=true

click on any cell => edit the cell

why it behaves differently with HyperGrid ?

  • Administrators
Posted
2 hours ago, bruno65 said:

when i use the new property HyperGrid with this setting :

  • HyperGridEnabled=true 
  • HyperGridOptions hgMonitorChanges=true, hgHideDirtyMark=true

click on any cell => edit the cell

why it behaves differently with HyperGrid ?

HyperGrid is a complete different mode of operation for DBGrid. Please refer to HyperGrid docs for details.

Posted

Hello @bruno65

Would you mind testing and playing around with this workaround?

1. UniDBGrid.ClientEvents.ExtEvents ->

function cellclick(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
{                
    this._lastClickedCell = {row: rowIndex, column: cellIndex};
}

2. UniDBGrid.ClientEvents.ExtEvents [Ext.data.Store] ->

function store.update(sender, record, operation, modifiedFieldNames, details, eOpts)
{    
    if (operation !== 'commit') return;
    
    var grid = this.grid;
    if (!grid || !grid.editingPlugin) return;

    var edPlugin = grid.editingPlugin;
    if (edPlugin.clicksToEdit !== 1) return;
    
    if (edPlugin.isRowEditor) return;

    var pos = grid._lastClickedCell;
    if (!pos || pos.row < 0 || pos.column < 0) return;

    Ext.defer(function() {
        edPlugin.startEditByPosition({ row: pos.row, column: pos.column });
    }, 50);
}

 

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