Jump to content

Can I set distance between RowEditor and Grid in UniDBGrid ?


worapop

Recommended Posts

  • 1 month later...

Hi Sherzod,

How to position roweditor's "confirm/cancel" buttons just below the focus/editing cell of dbgrid?

Roweditor is so handy that I dont need another form/panel to edit fields.. I like this feature :)

 

Thanks,

Frances

Link to comment
Share on other sites

2 hours ago, fraxzi said:

How to position roweditor's "confirm/cancel" buttons just below the focus/editing cell of dbgrid?

Maybe you want this for starters:

function afterrender(sender, eOpts)
{
    var me=sender;
    if (me.editingPlugin.isRowEditor) {
        me.editingPlugin.editorCfg.cls = "_roweditor";
        me.addCls('_roweditor');
        
        me.editingPlugin.editorCfg.listeners = {
            show: function() {
                var ed=this.activeField;
                me.getEl().select('.x-grid-row-editor-buttons').setX(ed.getX());
            }
        };
    };
}

 

Link to comment
Share on other sites

14 hours ago, Sherzod said:

Maybe you want this for starters:


function afterrender(sender, eOpts)
{
    var me=sender;
    if (me.editingPlugin.isRowEditor) {
        me.editingPlugin.editorCfg.cls = "_roweditor";
        me.addCls('_roweditor');
        
        me.editingPlugin.editorCfg.listeners = {
            show: function() {
                var ed=this.activeField;
                me.getEl().select('.x-grid-row-editor-buttons').setX(ed.getX());
            }
        };
    };
}

 

Hi Sherzod,

it works!

 I noticed that when you change cell (position) and click on dbnavigator's edit button, the roweditor buttons still position from previous selected cell.

 

Thanks,

Frances

roweditor_buttons1.png

Link to comment
Share on other sites

Hi,

2 hours ago, fraxzi said:

 I noticed that when you change cell (position) and click on dbnavigator's edit button, the roweditor buttons still position from previous selected cell.

Yes, I know.

And therefore noted that:

16 hours ago, Sherzod said:

...for starters

 

Link to comment
Share on other sites

Hi Sherzod,

I did it with the same sample "Gridgrouping - Dynamic", just double click on dbgrid and click on roweditor cancel or confirm buttons (either, or randomly)..

It wont close, but if dbnavigator's refresh button clicked, id does close.

 

Thanks,

Frances

Link to comment
Share on other sites

8 minutes ago, fraxzi said:

I did it with the same sample "Gridgrouping - Dynamic", just double click on dbgrid and click on roweditor cancel or confirm buttons (either, or randomly)..

It wont close, but if dbnavigator's refresh button clicked, id does close.

Hmm, I couldn't reproduce this behavior...

Link to comment
Share on other sites

7 minutes ago, Sherzod said:

Is everything normal at the moment?

Hi Sherzod,

I think I consider it normal at the moment... I will observe further on capture the screen if it manifest again (in random).

 

Thanks! I feel so welcome in this community (i'm newbie so please bare with me).

This is my first Delphi+UniGUI project :) 

 

Kind regards,

Frances

Link to comment
Share on other sites

1 hour ago, fraxzi said:

Yes. No code changes.. just selected the theme.

1. 

function afterrender(sender, eOpts)
{
    var me=sender;
    if (me.editingPlugin.isRowEditor) {
        me.editingPlugin.editorCfg.cls = "_roweditor";
        me.addCls('_roweditor');
        
        me.editingPlugin.editorCfg.listeners = {
            show: function() {
                if (me.activeTD) {
                    me.getEl().select('.x-grid-row-editor-buttons').setX(Ext.get(me.activeTD).getX());
                }
            }
        };
    };
}

2.

function cellclick(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
{
    this.activeTD=td;
}

 

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.

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