Skepsis IT Posted May 23, 2019 Share Posted May 23, 2019 Hi, I need to create all the columns on a dbgrid dynamically and also have some grouping. Everythings works fine but no grouping. For example after I create columns dynamically for I := 0 to cds.Fields.Count-1 do begin grdData.Columns.Add; grdData.Columns[i].FieldName:=cds.Fields[i].FieldName; grdData.Columns[i].Alignment:=cds.Fields[i].Alignment; grdData.Columns[i].Sortable:=True; ..... end; grdData.Grouping.FieldName:='athletename'; grdData.Grouping.ShowCaption:=True; grdData.Grouping.ShowValue:=True; grdData.Grouping.Enabled:=True; grdData.DataSource:=Datasource1; grdData.Refresh; Anyone have a clue? Regards Quote Link to comment Share on other sites More sharing options...
Skepsis IT Posted June 20, 2019 Author Share Posted June 20, 2019 Nobody....? Quote Link to comment Share on other sites More sharing options...
sertatar76 Posted October 5, 2020 Share Posted October 5, 2020 did you solve the problem? Quote Link to comment Share on other sites More sharing options...
sertatar76 Posted October 6, 2020 Share Posted October 6, 2020 add source code: UniDBGrid1.Grouping.Enabled := True; UniDBGrid1.Grouping.FieldName := 'COUNTRY'; UniDBGrid1.OnColumnSort := UniDBGrid1ColumnSort; not work. If in desing add UniDBGrid1.Grouping.Enabled = True then it`s work. What should I write in UniDBGrid1.JSInterface.JSCode(...) ? GridGroup_Test.zip 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.