Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Grid Cell index value |
Wed, Sep 23 2015 9:03 PM | Permanent Link |
PhillipH | My testing seems to indicate the Index value is the index of the visible cells. If this is correct, is there a way to relate this back to a row number ?
e.g. I would like to colour a cell but as its colour would depend a value not in the current cell I need a reference that I can use to look up some external data. Note: My grids are unbound. Phillip |
Thu, Sep 24 2015 9:16 AM | Permanent Link |
Trinione | PhillipH wrote:
<< My testing seems to indicate the Index value is the index of the visible cells. If this is correct, is there a way to relate this back to a row number ? >> Not sure if this is what you are looking for. grdName.Rows[RowIndex][ColumnIndex] << g. I would like to colour a cell but as its colour would depend a value not in the current cell I need a reference that I can use to look up some external data. Note: My grids are unbound. >> Again, not sure but maybe this would help guide you along: var col: TGridColumn; cel: TGridCell; begin col := grdCalendar.NewColumn; case i of 0: col.OnCellUpdate := GridColumn1CellUpdate; 1: procedure TfrmForm1.GridColumn1CellUpdate(Sender: TObject; ACell: TGridCell); begin SetupCell(ACell); end; procedure TfrmForm1.SetupCell(ACell: TGridCell); begin ACell.Background.Fill.Color := clWhiteSmoke; end; |
Thu, Sep 24 2015 12:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Phillip,
<< My testing seems to indicate the Index value is the index of the visible cells. If this is correct, is there a way to relate this back to a row number ? >> Yes, that is correct. Unfortunately, what you want is the *protected* TGrid.RowOffset property. I'll see if I can expose this data in a more rational way for the TGridCell instance, something like a RowIndex property that does the calculations for you. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |