Jump to content

Example error C: \ Program Files (x86) \ FMSoft \ Framework \ uniGUI \ Demos \ Desktop \ GridGrouping - Dynamic


eduardosuruagy

Recommended Posts

Example error
C: \ Program Files (x86) \ FMSoft \ Framework \ uniGUI \ Demos \ Desktop \ GridGrouping - Dynamic

When I leave the option UniDBGrid1.Grouping.Enabled: = False and I run the system then I try to enable grouping via code and it doesn't work, it simply does nothing. This error I had posted before.

Link to comment
Share on other sites

11 hours ago, eduardosuruagy said:

When I leave the option UniDBGrid1.Grouping.Enabled: = False and I run the system then I try to enable grouping via code and it doesn't work, it simply does nothing. This error I had posted before.

Hello,

Is this solution ok for you?

1. In DesignTime:

UniDBGrid1.Grouping.Enabled = True

2. 

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  UniDBGrid1.Grouping.Enabled := False;
end;

3. Then you can use:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniDBGrid1.Grouping.Enabled := not UniDBGrid1.Grouping.Enabled;
end;

 

  • Like 1
Link to comment
Share on other sites

58 minutes ago, Sherzod said:

Hello,

Is this solution ok for you?

1. In DesignTime:


UniDBGrid1.Grouping.Enabled = True

2. 


procedure TMainForm.UniFormReady(Sender: TObject);
begin
  UniDBGrid1.Grouping.Enabled := False;
end;

3. Then you can use:


procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniDBGrid1.Grouping.Enabled := not UniDBGrid1.Grouping.Enabled;
end;

 

Yes it worked, explain the difference between onActivate, onShow and onReady?

Because at the beginning I did the test on onShow and it didn't work.

Link to comment
Share on other sites

  • 1 year later...
On 8/25/2020 at 8:40 AM, Sherzod said:

Hello,

Is this solution ok for you?

1. In DesignTime:

UniDBGrid1.Grouping.Enabled = True

2. 

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  UniDBGrid1.Grouping.Enabled := False;
end;

3. Then you can use:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniDBGrid1.Grouping.Enabled := not UniDBGrid1.Grouping.Enabled;
end;

 

This desktop approach works, but when using TUnimDBGrid or error.

 

procedure TUniFrameCadAtendVeiculoM.UnimDBGridServicosSwipe(Sender: TObject);
begin
  Self.UnimDBGridServicos.Grouping.Enabled := not Self.UnimDBGridServicos.Grouping.Enabled;  
end;

 

Capturar.PNG

Link to comment
Share on other sites

10 minutes ago, Sherzod said:

Hello,

Try this approach:

procedure TMainmForm.UnimButton1Click(Sender: TObject);
begin
  with UnimDBGrid1 do
    JSInterface.JSCode(#1'.setGrouped(!'#1'.getGrouped());')
end;

 

1) by default Grouping comes true.

2)

procedure TUniFrameCadAtendVeiculoM.UnimFormCreate(Sender: TObject);
begin
  inherited;
  Self.UnimDBGridServicos.Grouping.Enabled := False;
end;

3)

 

procedure TUniFrameCadAtendVeiculoM.UnimDBGridServicosClickHold(
  Sender: TObject);
begin
  UnimDBGridServicos.JSInterface.JSCode(#1'.setGrouped(!'#1'.getGrouped());');
  inherited;
end;

 

Item 3 doesn't work, doesn't enable grouping.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...