epos4u Posted November 21, 2015 Posted November 21, 2015 Hi, re : UnimDBGrid data alignment the header alignments works ok, but the data alignment is always left how can i change to right alignment like for currency etc thank you
mhmda Posted November 21, 2015 Posted November 21, 2015 Try this: .custom-grid .x-panel-body-default { background-color: #e5e5e5 !important; } .custom-grid .x-box-inner { background-color: #666666 !important; } .custom-grid .x-grid-cell { background-color: #e5e5e5; border-bottom-color: #c2c2c2; border-left-color: #e5e5e5; color: #333333; height:32px; vertical-align:middle; font-size:12px !important; } .custom-grid .x-grid-with-col-lines .x-grid-cell { border-right-width: 0px !important; } .custom-grid .x-grid-row-over .x-grid-cell { background-color: #dad9d9; } .custom-grid .x-grid-row-selected .x-grid-cell { background-color: #cbcbcb !important; border-bottom-style: solid !important; border-top-style: solid !important; border-bottom-color: #c2c2c2; border-left-color: #e5e5e5; } .custom-grid .x-column-header-inner{ background-color: #666666 !important; color:#fff !important; font-size:12px !important; height:32px !important; padding-top:9px; } .custom-grid .x-column-header-over{ background-image:none !important; background-color: #817e7e !important; } .custom-grid .x-column-header { border-right: 0px; !important; } Result looks like this:
Sherzod Posted November 21, 2015 Posted November 21, 2015 I hope that the next version will be added to published property Alignment!
Sherzod Posted November 21, 2015 Posted November 21, 2015 For now, you can use...: for example: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimDBGrid1.Columns[0].Alignment := taCenter end; Best regards.
epos4u Posted November 21, 2015 Author Posted November 21, 2015 For now, you can use...: for example: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimDBGrid1.Columns[0].Alignment := taCenter end; Best regards. Thank you, worked perfect, just 1 more question, how can i display currency to 2 decimal places, i have 1.70 , i want to see 1.70 and not 1.7 thanks again
Recommended Posts