Jump to content

Recommended Posts

8 hours ago, thiagopedro said:

I am looking to automatically center the grid toolbar.

Hi,

One possible solution:

UniDBGrid1.ClientEvents.ExtEvents ->

function beforerender(sender, eOpts)
{
    var pagingBar=sender.pagingBar;
    if (pagingBar) {
        pagingBar.add(0, {xtype: 'tbfill'});
        pagingBar.add({xtype: 'tbfill'});
    }
}

 

Link to post
Share on other sites
13 hours ago, Sherzod said:

Hi,

One possible solution:

UniDBGrid1.ClientEvents.ExtEvents ->


function beforerender(sender, eOpts)
{
    var pagingBar=sender.pagingBar;
    if (pagingBar) {
        pagingBar.add(0, {xtype: 'tbfill'});
        pagingBar.add({xtype: 'tbfill'});
    }
}

 

 

1:

it worked thank you
Could you explain what each command does? Their role.
Why css would I also get this result?

 

 

2:

Assigning in designtimer worked.
When I assemble the event at runtime through the create of the frame, it doesn't work. Any tips?

procedure TUniFrame.UniFrameCreate(Sender: TObject);
begin
  UniDBGrid.ClientEvents.UniEvents.Values['beforerender'] :=
    'function beforerender(sender, eOpts)'+
    '{'+
    'var pagingBar=sender.pagingBar;'+
    'if (pagingBar) {'+
    'pagingBar.add(0, {xtype: ''tbfill''});'+
    'pagingBar.add({xtype: ''tbfill''});'+
    '}'+
    '}';
end;

  • Like 1
Link to post
Share on other sites
13 hours ago, thiagopedro said:

When I assemble the event at runtime through the create of the frame, it doesn't work. Any tips?

 

13 hours ago, thiagopedro said:

UniDBGrid.ClientEvents.UniEvents.Values['beforerender'] :=
    'function beforerender(sender, eOpts)'+
    '{'+
    'var pagingBar=sender.pagingBar;'+
    'if (pagingBar) {'+
    'pagingBar.add(0, {xtype: ''tbfill''});'+
    'pagingBar.add({xtype: ''tbfill''});'+
    '}'+
    '}';

Replace to ExtEvents

  • Like 1
Link to post
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...