Jump to content

How to prevent scrolling after editing? in the "GridsColumnLockingAndHeaderGrouping"


Recommended Posts

Posted

Hi guys:

Good morning.

in the demo of in  "GridsColumnLockingAndHeaderGrouping"

I want to enter data and click to other rows without scrolling the table.

Can do it ?

image.gif.eb8e99d980ef682b97cdc44c2a36b9d1.gif

 

I tried changing the settings to the following, but it didn't work

image.thumb.png.7d44d6addd55bee27a41338c3e1dc3a0.png

 

Requesting help, looking forward to reply, Thanks in advance.

 

------------------------------------------------------------------------------------------------------------------------------------------------------

Env ref:

image.png.c29efd58dbeb6f1ad78e3d0b7dc8f845.png

Posted

From what I can see, this behavior might be related to an issue within Ext JS itself, possibly when working with locked columns and scroll preservation.

I'll try to analyze it further and see if there's a reliable workaround.

Posted
14 hours ago, Sherzod said:

From what I can see, this behavior might be related to an issue within Ext JS itself, possibly when working with locked columns and scroll preservation.

I'll try to analyze it further and see if there's a reliable workaround.

Morning!

Thanks a lot.

Env:

unigui 1599, extjs:7.8.0

 

Posted

Hello @builder

Try this approach and see if it affects any other logic in your application.

1. MainForm.Script ->

Ext.override(Ext.grid.Panel, {
    focus: function() {
        if (this._disableGridFocus) {
            this._disableGridFocus = false;
            return;
        }
        this.callParent(arguments);
    }
});

2. UniDBGrid.ClientEvents.ExtEvents ->

function beforeedit(editor, context, eOpts)
{
    editor.grid._disableGridFocus = true;
}

 

Posted
15 hours ago, Sherzod said:

Hello @builder

Try this approach and see if it affects any other logic in your application.

1. MainForm.Script ->

Ext.override(Ext.grid.Panel, {
    focus: function() {
        if (this._disableGridFocus) {
            this._disableGridFocus = false;
            return;
        }
        this.callParent(arguments);
    }
});

2. UniDBGrid.ClientEvents.ExtEvents ->

function beforeedit(editor, context, eOpts)
{
    editor.grid._disableGridFocus = true;
}

 

Morning , Sherzod.

Thank you so much!

but have some troubles: 

image.thumb.png.d63efa287fc58197a9ab32b46dbf493c.png

1、How can I use 【code 1】 alone in the createform event of a form?

2、In this form i need use [Code1] &[Code2]  together, how to do?

 

thanks.

Posted
3 hours ago, builder said:

How can I use 【code 1】 alone in the createform event of a form?

Why? You can just add it once in MainForm.Script or even include it in the project as a custom JS file.

Posted
1 hour ago, Sherzod said:

Why? You can just add it once in MainForm.Script or even include it in the project as a custom JS file.

okay.

but now,  [Code1] &[Code2] can't  work  together.

Is there any way to solve it?

 

Posted
2 hours ago, builder said:

oh sorry, now there is a big problem, the checkbox can't tick or untick.

Hello,

This issue isn’t caused by our custom JS, is it?

Posted
On 8/1/2025 at 7:25 PM, Sherzod said:

Comment this code and check it again.

yes sir, when comment this code, ckeckbox can tick/ untick.

But the problem in the title will appear again.

Posted
19 minutes ago, builder said:

yes sir, when comment this code, ckeckbox can tick/ untick.

Sorry to ask again, but could you please create a simple test example?

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