Jump to content

Text on middle in UniDBGrid


artem_niko

Recommended Posts

2 hours ago, Sherzod said:

I was write:

1. UniServerModule -> CustomCSS:

.customHeader .x-group-sub-header, .customHeader .x-column-header 
{
   border: none;
   vertical-align: middle;
}

2. UniDBGrid -> LayoutConfig ->Cls = customgrid

But, this is not working...

Link to comment
Share on other sites

@ApTem

Just put this code on Servermodule Create event

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
  //Thx to Sherzod

  UniServerModule.CustomCSS.Clear;
  UniServerModule.CustomCSS.Add(
    '.x-grid-cell {' +
    '  vertical-align: middle;' +
//    '  vertical-align: bottom;' +
    '}');

  UniServerModule.CustomCSS.Add(
    '.x-grid-cell-inner {' +
    '  line-height: 100%;' +
    '}');

end;

 

Link to comment
Share on other sites

11 minutes ago, Abaksoft said:

@ApTem

Just put this code on Servermodule Create event


procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
  //Thx to Sherzod

  UniServerModule.CustomCSS.Clear;
  UniServerModule.CustomCSS.Add(
    '.x-grid-cell {' +
    '  vertical-align: middle;' +
//    '  vertical-align: bottom;' +
    '}');

  UniServerModule.CustomCSS.Add(
    '.x-grid-cell-inner {' +
    '  line-height: 100%;' +
    '}');

end;

 

Great! :)

It's working!!!

Thank's, @Sherzod, @Abaksoft!

One question.

When I applyng this code, in UniDBGrid again I seeing vertical lines in header (in title).

I was try write that:

  UniServerModule.CustomCSS.Clear;
  UniServerModule.CustomCSS.Add(
    '.x-grid-cell {' +
    '  vertical-align: middle;' +
    ' border: none;' +
    '}');

  UniServerModule.CustomCSS.Add(
    '.x-grid-cell-inner {' +
    ' border: none;' +
    '  line-height: 100%;' +
    '}');

But, it's not workin, vertical lines is still stay...

Link to comment
Share on other sites

Hi,

13 hours ago, Артем said:

I don't want remove this class

You do not need to delete this class.

13 hours ago, Артем said:

When I applyng this code, in UniDBGrid again I seeing vertical lines in header (in title).

Then try this:

.customHeader .x-group-sub-header, .customHeader .x-column-header 
{
    border: none;
}

.customHeader .x-grid-td {
    vertical-align: middle;
}

 

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