picyka Posted July 25, 2023 Share Posted July 25, 2023 EmptyText is not visible with dataset close. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 25, 2023 Share Posted July 25, 2023 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; Quote Link to comment Share on other sites More sharing options...
picyka Posted July 25, 2023 Author Share Posted July 25, 2023 I was trying to center on uniMainModule, would it be possible? Thanks Grid.zip Quote Link to comment Share on other sites More sharing options...
picyka Posted July 25, 2023 Author Share Posted July 25, 2023 Event: UniGUIMainModuleNewComponent Quote Link to comment Share on other sites More sharing options...
picyka Posted July 25, 2023 Author Share Posted July 25, 2023 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. 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.