I´m testing the TMSFNCDataGrid in a Firemonkey-project.
So far i really like it.
In my Test-Project i get an AV when i try to collapse a row (DetailControl is not assigned):
I´ve bound a datasource to the Grid and set LoadMode
in the Adapter to almAllRecords
:
procedure TMainForm.Btn_GroupClick(Sender: TObject);
begin
TMSFNCDataGrid1.Ungroup;
TMSFNCDataGrid1.Group(TMSFNCComboBox1.ItemIndex);
end;
procedure TMainForm.FormShow(Sender: TObject);
var
lAdataper: TTMSFNCDataGridDatabaseAdapter;
I: Integer;
begin
lAdataper := TMSFNCDataGrid1.Adapter as TTMSFNCDataGridDatabaseAdapter;
lAdataper.DataSource := DataSource1;
lAdataper.AutoCreateColumns := True;
TMSFNCComboBox1.Text := '';
TMSFNCComboBox1.Items.Clear;
for I := 0 to lAdataper.Columns.Count - 1 do
begin
TMSFNCComboBox1.Items.Add(lAdataper.Columns[I].FieldName);
end;
TMSFNCComboBox1.ItemIndex := 0;
end;