Hi, i have noticed a Bug, when i 3 different TMSNCDataGrids, in a
Master
Detail-Master
Detail
configuration. In this Configuration, using Banding=True in the first and second Grid did not work anymore. Everything else works like expected. After clearing the DetailControl in the second TTMSFNCDataGridDatabaseAdapter, Banding works again.
Can you provide some screenshot of how it looks with and without the third grid? We noticed banding is applied to odd rows, but when rows are collapsed, they still count towards the banding.
The second grid seems not working. The third grid works if there are more then one row. If i try to emulate banding, using OnGetCellLayout on the second grid, the same error occurs, and paint all rows in one color, not only the odd ones.
The second image is with two grids - both working correct. The error is independent from the plattform (vlc/fmx).
My personal solution is, using a user defined inplace editor (which is the third grid), I simply build a wrapper around the real cell value:
TValuedDataGrid = class(TTMSFNCDataGrid)
private
FValue : String;
public
property
Value : String
read FValue write FValue;
end;
procedure TSmallSmartFolders.FilesDataGridGetInplaceEditorClass(Sender:
TObject; ACell: TTMSFNCDataGridCellCoord; var AInplaceEditorClass:
TTMSFNCDataGridInplaceEditorClass);
begin
if ACell.Column=1 then
AInplaceEditorClass := TValuedTreeView else
if ACell.Column=2 then
AInplaceEditorClass := TValuedDataGrid;
end;
procedure TSmallSmartFolders.FilesDataGridCellEditSetData(Sender: TObject;
ACell: TTMSFNCDataGridCellCoord; AInplaceEditor:
TTMSFNCDataGridInplaceEditor; var AValue: TTMSFNCDataGridCellValue);
begin
if AInplaceEditor is TValuedTreeView then
AValue := TValuedTreeView(AInplaceEditor).Value else
if AInplaceEditor is TValuedDataGrid then
AValue := TValuedDataGrid(AInplaceEditor).Value;
end;