![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Mon, May 1 2017 9:57 AM | Permanent Link |
thomh | Hi Tim,
For a bound grid: Is it possible to change the formatting of a grid cell based on the contents of another grid cell or another column in the underlying dataset? If not, is it possible to do this for an unbound grid? Thanks. // Thom |
Mon, May 1 2017 10:30 AM | Permanent Link |
thomh | It does seem to work for a bound grid.
I got this code in the OnCellUpdate event ('Flags' is another column in the dataset): if FData.Columns['Flags'].AsInteger = 1 then begin ACell.Font.Style.Bold := True; end else begin ACell.RefreshInterface; end; And it does set the text for the relevant cell to bold. Also when I move in the grid with up/down keys it works. However, where it fails is when I position the selection cursor on the row which has the bold text and highlight another row with the mouse. The result is that the row that was highlighted with the mouse selection cursor also get the bold text. // Thom |
Mon, May 1 2017 1:45 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Thom,
<< For a bound grid: Is it possible to change the formatting of a grid cell based on the contents of another grid cell or another column in the underlying dataset? >> No, you cannot make any assumptions about the underlying dataset. You can only use what is provided for the grid cell instance in terms of its contents. The TGrid control is virtual and grid cells can be updated for all sorts of reasons, some of which have nothing to do with the underlying dataset. << If not, is it possible to do this for an unbound grid? >> Same restriction. Tim Young Elevate Software www.elevatesoft.com |
Wed, May 3 2017 5:24 PM | Permanent Link |
Richard Harding Wise Nutrition Coaching | thomh
<<Is it possible to change the formatting of a grid cell based on the contents of another grid cell or another column in the underlying dataset? >> If the grid is bound to a dataset and the cell is an contains an index column then you can create a another "shadow" dataset, lookup the required values and change the formatting of the cell in the OnCellUpdate event. It is limited in its use but I have found it useful. Richard |
This web page was last updated on Tuesday, February 11, 2025 at 11:58 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |