Roberto Nicchi Posted July 19, 2021 Share Posted July 19, 2021 I would like to display a message inside the Tunidbgrid component. The situation is: the user open a form and see the grid. The grid is empty. The user should see a message in the middle of the grid that tell what to do: click some button o press a key to find the data. Any idea ? thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 19, 2021 Share Posted July 19, 2021 49 minutes ago, Roberto Nicchi said: I would like to display a message inside the Tunidbgrid component. The situation is: the user open a form and see the grid. The grid is empty. The user should see a message in the middle of the grid that tell what to do: click some button o press a key to find the data. Any idea ? Hello, Use UniDBGrid -> EmptyText property. Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted July 19, 2021 Author Share Posted July 19, 2021 22 minutes ago, Sherzod said: Hello, Use UniDBGrid -> EmptyText property. I have seen it and would be perfect but text is displayed only when the dataset has been opened. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 19, 2021 Share Posted July 19, 2021 20 minutes ago, Roberto Nicchi said: I have seen it and would be perfect but text is displayed only when the dataset has been opened. OK. I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 19, 2021 Share Posted July 19, 2021 22 minutes ago, Roberto Nicchi said: I have seen it and would be perfect but text is displayed only when the dataset has been opened. Can you try this approach? UniDBGrid -> ClientEvents -> ExtEvents -> function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { if (sender.getStore().count() == 0) { sender.getView().refresh() } } 1 Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted July 20, 2021 Author Share Posted July 20, 2021 12 hours ago, Sherzod said: Can you try this approach? UniDBGrid -> ClientEvents -> ExtEvents -> function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { if (sender.getStore().count() == 0) { sender.getView().refresh() } } Thanks! Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted July 20, 2021 Author Share Posted July 20, 2021 13 minutes ago, Roberto Nicchi said: Thanks! And for who want to change the text at runtime: with thegrid.JSInterface do JSCall('setEmptyText', ['The text']) 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 20, 2021 Share Posted July 20, 2021 4 hours ago, Roberto Nicchi said: And for who want to change the text at runtime: Also you can use html tags... 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.