Jump to content

Change the color of selected row in UniDBGrid


Recommended Posts

  • 2 weeks later...
  • 5 months later...
  • 2 weeks later...
  • 1 month later...

if values = 1 then

Attribs.Font.Color := clRed

else

Attribs.Font.Color := clYellow;

 

Apenas pinta a célula, quero pintar toda a linha. Como faço?

 

Hi,

 

UniDBGrid1 -> OnDrawColumnCell

procedure TMainForm.UniDBGrid1DrawColumnCell(Sender: TObject; ACol,
  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);
begin
  if Column.Field.DataSet.FieldByName('FieldName').AsString = 'Value' then
  begin
    Attribs.Color := clGreen
  end;
end;

Best regards.

Link to post
Share on other sites
  • 1 month later...
  • 2 years later...
  • 7 months later...
  • 7 months later...
On 1/18/2020 at 7:39 AM, delphixpart said:

Dear All,

Greetings!

Appreciate help on how to use [.x-grid-row-selected], I have tried in CustomCSS in serverModule but no luck.

What am I missing?

Thanks in Advance

 

 

 

On 8/26/2015 at 12:56 AM, Sherzod said:

Hi,

 

Try:


.x-grid-row-selected .x-grid-cell-inner {
  font-weight: bold;
  background-color:green;
}

Best regards.

Does not work too.

unigui1514+xe10.3.3

  • Like 1
Link to post
Share on other sites
  • 2 weeks later...
  • 2 months later...
On 1/31/2020 at 4:25 PM, mehmet07 said:

unigui 1.90.0.1518  not work too. 

How we can solve this problem?

.DBG .x-grid-item-selected .x-grid-cell {
  font-weight: bold!important;
  background-color:blue!important;
}

 

Link to post
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...