Jump to content

UnimDBListGrid Header Alignment


gerhardhziegler

Recommended Posts

  • 2 months later...
28 minutes ago, gerhardhziegler said:

I did, but till now: no reply? Maybe there is a workaround? I didnt find any reconfigure event, to set the align of the headers/columns manually :/

Sorry for the late.

One possible solution:

function painted(sender, eOpts)
{
    var me=sender.element;
    
    // one-based indexing!
    
    me.select('.x-mgrid-header-col:nth-child(1)').setStyle('text-align', 'center');
    me.select('.x-mgrid-header-col:nth-child(2)').setStyle('text-align', 'center');
    me.select('.x-mgrid-header-col:nth-child(3)').setStyle('text-align', 'right');
}

 

Link to comment
Share on other sites

2 hours ago, Sherzod said:

Sorry for the late.

One possible solution:


function painted(sender, eOpts)
{
    var me=sender.element;
    
    // one-based indexing!
    
    me.select('.x-mgrid-header-col:nth-child(1)').setStyle('text-align', 'center');
    me.select('.x-mgrid-header-col:nth-child(2)').setStyle('text-align', 'center');
    me.select('.x-mgrid-header-col:nth-child(3)').setStyle('text-align', 'right');
}

 

Dear Sherzod, I just applied your source like:

function painted(sender, eOpts)
{
  var me=sender.element;
    
    // one-based indexing!
    
    me.select('.x-mgrid-header-col:nth-child(1)').setStyle('text-align', 'left');
    me.select('.x-mgrid-header-col:nth-child(2)').setStyle('text-align', 'left');
    me.select('.x-mgrid-header-col:nth-child(3)').setStyle('text-align', 'left');
}

that should affekt the first three header columns. But... , please see attached pic, the titles stay somewhere...

Screenshot_9.jpg

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