artem_niko Posted January 27, 2020 Share Posted January 27, 2020 Hello! How make text on middle in cell in UniDBGrid? Now: I want: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 27, 2020 Share Posted January 27, 2020 3 minutes ago, Артем said: How make text on middle in cell in UniDBGrid? Hello, This post may help you: http://forums.unigui.com/index.php?/topic/12632-как-в-dbgrid-в-одной-ячейке-текст-в-две-строки/&do=findComment&comment=67379 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 27, 2020 Author Share Posted January 27, 2020 2 hours ago, Sherzod said: Hello, This post may help you: http://forums.unigui.com/index.php?/topic/12632-как-в-dbgrid-в-одной-ячейке-текст-в-две-строки/&do=findComment&comment=67379 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... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 27, 2020 Share Posted January 27, 2020 But there is another CSS class. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 27, 2020 Author Share Posted January 27, 2020 1 minute ago, Sherzod said: But there is another CSS class. That using class by me hide vertical lines in header UniDBGrid. I don't want remove this class, but I don't know how add CSS, that create vertical-align = middle... Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted January 27, 2020 Share Posted January 27, 2020 @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; Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 27, 2020 Author Share Posted January 27, 2020 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... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28, 2020 Share Posted January 28, 2020 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; } 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 29, 2020 Author Share Posted January 29, 2020 23 hours ago, Sherzod said: Hi, You do not need to delete this class. Then try this: .customHeader .x-group-sub-header, .customHeader .x-column-header { border: none; } .customHeader .x-grid-td { vertical-align: middle; } Perfect! It's working successfull! Thank you, @Sherzod! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.