Hi Boki,
I'd like to be able to have some cells that occupy more than one row in a column. Is it possible to do this, as shown in the attached image?
The coloured cells in the image are just a mock up.
Thanks.
= Steve
Posted 23 June 2020 - 12:32 PM
Hi Boki,
I'd like to be able to have some cells that occupy more than one row in a column. Is it possible to do this, as shown in the attached image?
The coloured cells in the image are just a mock up.
Thanks.
= Steve
Posted 25 June 2020 - 02:42 PM
Any suggestions?
Posted 27 June 2020 - 05:46 PM
Unfortunately this is not that easy to accomplish.
I'm still not sure how it can be done.
Posted 28 June 2020 - 02:11 AM
Unfortunately this is not that easy to accomplish.
I'm still not sure how it can be done.
Would it be possible with NextGrid 5?
= Steve
Posted 28 June 2020 - 02:29 AM
I think it will be the same difficulty.
Posted 28 June 2020 - 04:22 AM
Hi Boki,
Never mind, I worked out how to do it.
= Steve
Posted 28 June 2020 - 12:19 PM
How you done it Did you really merged them, or just painted the colors?
Posted 29 June 2020 - 01:18 AM
How you done it Did you really merged them, or just painted the colors?
No I wasn't able to merge them. I used the Cell's Data property to store an Appointment ID. Using the OnGetGridCell event, it checks to see if the Data property for the cell below it contains the same Appointment ID, if it does it paints the bottom edge the same colour, giving the appearance of the cells being one.
procedure TDayPlanner.GetGridCell(Sender: TObject; ACol, ARow: Integer; var Edges: TNxBorderEdges; State: TNxCellPaintingState); var AppointmentID: integer; begin if (ACol < FGrid.ColCount - 1) and (ARow < FGrid.RowCount - 1) then begin if (ACol = 0) and (FGrid.Cell[ACol, ARow].AsString <> '') then begin Edges[beBottom].Color := clWhite; end else if (ACol = 0) and (FGrid.Cell[ACol, ARow].AsString = '') then begin Edges[beTop].Color := clWhite; end // Is there a Appointment ID in this cell? else if Integer(FGrid.Cell[ACol, ARow].Data) > 0 then begin // Make sure we aren't at the bottom of the grid if (ARow + 1) < FGrid.RowCount - 1 then begin AppointmentID := integer(FGrid.Cell[ACol, ARow].Data); // Is the next cell also the same Appointment ID? if Integer(FGrid.Cell[ACol, ARow + 1].Data) = AppointmentID then begin Edges[beBottom].Color := FGrid.Cell[ACol, ARow].Color; end; end; end; end; end;
= Steve
0 members, 1 guests, 0 anonymous users