Bocchi Posted September 25, 2015 Posted September 25, 2015 Is it possible to change RowHeight and FontSize of a UnimDBGrid? Now lines are too high and take up too much space. Thanks.
Sherzod Posted September 26, 2015 Posted September 26, 2015 Hi, RowHeight (default 60): 1. UnimDBGrid1 -> ClientEvents -> UniEvents -> add beforeInit fn: function beforeInit(sender, config) { config.itemHeight = 30; } 2. And UniServerModule.CustomCSS: .x-grid .x-grid-cell { height: 30px; line-height: 30px; } with FontSize: 1. UniServerModule.CustomCSS: .x-grid .x-grid-cell { height: 30px; line-height: 30px; font-size: 12px; } Try... Best regards.
Bocchi Posted September 28, 2015 Author Posted September 28, 2015 It works but now all grid has changed (also uniDBGrid in non-mobile forms). It is possible to set these options in runtime? Thanks.
Sherzod Posted September 28, 2015 Posted September 28, 2015 Hi, I think in the next versions it will be possible to change in the properties,while you can try this.. One of the possible solutions with CSS: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UniSession.SetStyle( '#'+UnimDBGrid1.JSName+'_id div[id*="gridrow"] > div {' + ' height: 30px;' + ' line-height: 30px;' + ' font-size: 12px;' + '}'); end; Best regards.
Recommended Posts