anderson da silva Posted January 6, 2022 Share Posted January 6, 2022 Hi, I have a following Scene: 1. A uniDbGrid with no fields created 2. a TfdMemTable with no Field created When I populate my TfdMemTable with fields and records, I would like to create a grouping in this uniDbGrid that received the information. It does not generate an error, it creates an ordering but does not group. How to solve? I've seen all the examples but in all of them the creation already has the grouping and in my case I still don't have a field created to be used in this creation. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2022 Share Posted January 6, 2022 45 minutes ago, anderson da silva said: I have a following Scene: Hello, Can you please specify, which edition and build of UniGUI are you using? Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 uni-1.90.0.1543 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2022 Share Posted January 6, 2022 Not a Trial Version? Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 Paid professional version. Here is the link of a project I made as an example of how it should work https://drive.google.com/file/d/1oNZPBzrtGU19WiwkHfNND5W-4fSeGJcp/view?usp=sharing Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 Delphi 10.4.2 Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 I tested it a little while also with delphi 11 and uni-1.90.0.1556 and it doesn't work either Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2022 Share Posted January 6, 2022 18 minutes ago, anderson da silva said: Paid professional version. Please adjust your forum email address and attach here: Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 OK, I adjusted it on my portal. 1 Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 My ID is 00144 Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2022 Share Posted January 6, 2022 Thanks. Please attach your testcase here. Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 6, 2022 Author Share Posted January 6, 2022 GroupRunTime.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2022 Share Posted January 6, 2022 3 hours ago, anderson da silva said: GroupRunTime.rar 33.18 kB · 2 downloads Workaround: 1. procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniDBGrid1.JSInterface do JSConfig('features', [JSObject('ftype: "grouping"')]) end; 2. ... UniComboBox1.Items.Clear; UniComboBox1.Items.Add('Pais'); UniComboBox1.Items.Add('Estado'); UniComboBox1.ItemIndex := 0; UniComboBox1.OnChange(UniComboBox1); //<------- ... 3. procedure TMainForm.UniButton2Click(Sender: TObject); begin If UniDBGrid1.Grouping.Enabled = False Then Begin UniButton2.Caption := 'Desagrupar'; with UniDBGrid1 do begin Grouping.Enabled := True; JSInterface.JSCall('getStore().setConfig', [JSInterface.JSObject('groupField: "'+ Columns.ColumnFromFieldName(Grouping.FieldName).ColID.ToString +'"')]); end; End else Begin UniButton2.Caption := 'Agrupar'; with UniDBGrid1 do begin Grouping.Enabled := False; JSInterface.JSCall('getStore().setConfig', [JSInterface.JSObject('groupField: null')]); end; End; end; Quote Link to comment Share on other sites More sharing options...
anderson da silva Posted January 11, 2022 Author Share Posted January 11, 2022 GroupRunTimeV2.rar Quote Link to comment Share on other sites More sharing options...
VolkovVitalD Posted March 10, 2022 Share Posted March 10, 2022 This workaround very good, but not work with summary total and grand total. Please make next workaround. Quote Link to comment Share on other sites More sharing options...
VolkovVitalD Posted March 10, 2022 Share Posted March 10, 2022 I tried this: with UniDBGrid1.JSInterface do JSConfig('features', [JSObject('ftype: "grouping",showSummaryRow:true'), JSObject('ftype: "summary",ftotal:true,dock:"bottom"') ] ); But since Summary=false, no called methods for calculate summary. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 14, 2022 Share Posted March 14, 2022 On 3/10/2022 at 9:16 PM, VolkovVitalD said: This workaround very good, but not work with summary total and grand total. Please make next workaround. Hello, Can you make a simple testcase to test? 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.