![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Mon, Oct 8 2018 7:48 PM | Permanent Link |
jdforce | Hi,
I am getting a JSON with a TServerRequest, in the Complete Event. Then I load the JSON to a dataset on the dataset.loadrows method. Then dynamically I fill a grid, column by column with the data like so: grid1.columns[0].header.caption := 'Device ID'; grid1.columns[0].dataColumn := 'deviceid'; grid1.columns[0].width := 80; It works good, but I want to change the color for a row according to the value of one of the fields. The change of color of course must be paired with the value if I click on the column title to sort up or down. I have not found a way to accomplish this, and need some example or suggestion please. JD |
Tue, Oct 9 2018 1:12 PM | Permanent Link |
jdforce | jdforce wrote:
Actually the new requirement I was given is to color a single cell, containing a number, depending on the number it will be red, yellow or green. It is for alerting when some data is received. |
Tue, Oct 9 2018 1:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | << It works good, but I want to change the color for a row according to the value of one of the fields. The change of color of course must be paired with the value if I click on the column title to sort up or down. >>
What you want is this event: https://www.elevatesoft.com/manual?action=viewevent&id=ewb2&comp=TGridColumn&event=OnCellUpdate Tim Young Elevate Software www.elevatesoft.com |
Wed, Oct 10 2018 6:15 AM | Permanent Link |
Uli Becker | > Actually the new requirement I was given is to color a single cell, containing a number, depending on the number it will be red, yellow or green. It is for alerting when some data is received.
In addition to Tim's hint, here a sample how to read the cell's data within the OnCellUpdate event: if ACell.Data = '0' then begin ACell.Font.Color := clRed; ACell.Font.Style.Bold := true; end else begin ACell.Font.Color := clBlack; ACell.Font.Style.Bold := false; end; Uli |
Thu, Oct 11 2018 3:00 PM | Permanent Link |
jdforce | Thanks guys, will test that ASAP.
|
This web page was last updated on Wednesday, November 29, 2023 at 09:43 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |