Jump to content

UniDBGrid.EmptyText


picyka

Recommended Posts

Hello,

1 hour ago, picyka said:

EmptyText is not visible with dataset close.

Can you try this config?

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniDBGrid1.JSInterface.JSConfigObject('viewConfig', 'deferEmptyText', [False]);
end;

 

Link to comment
Share on other sites

Solution:

 

function beforeInit(sender, config)
{
    config.viewConfig.deferEmptyText = false;
    config.emptyText = '<i class="fas fa-inbox"></i> Não há dados no momento.';
}
procedure TUniDBGridHelper.ConfigureEmptyText;
begin
  Self.ClientEvents.UniEvents.Values['beforeInit'] :=
  'function beforeInit(sender, config) ' +
  '{ ' +
  '    config.viewConfig.deferEmptyText = false; ' +
  '    config.emptyText = ''<i class="fas fa-inbox"></i> Não há dados no momento.''; ' +
  '}';
end;
procedure TUniMainModule.UniGUIMainModuleNewComponent(AComponent: TComponent);
begin
  if AComponent is TUniDBGrid then
  begin
    TUniDBGrid(AComponent).ConfigureEmptyText;
  end;
end;

Tks.

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...