Is there a way to customize the message that shows up when a grid has no records to display? The default is 'Grid has no data'.
I see there is a property called emptyFilteredGridMessage but I want to display my own message even when it is not filtered.
Hello, you can use emptyGridMessage:
<igx-grid #grid [data]="Data" [emptyGridMessage]="'The grid is empty'" [autoGenerate]="true"></igx-grid>
Works great. Not sure how I missed that one but found emptyFilteredGridMessage so easily lol. Thanks!
I'm glad that I could help. I think you will find our API docs helpful next time when you want to see all available properties, methods etc.
What is the best approach to customize style for "No results" message?
I'm currently targeting the class ".igx-grid__tbody-message" in the global style.
Would that affect other messages styles that are not "no results"?
I assume any class "igx-grid" affect only igx-grids elements.
Hello Celi Zarate,
Yes, you can use the class in order to alter the "empty message" style. Currently, we do not expose a way to style it through our theme. Keep in mind that the text color will be changed based on the grid's body color.
Can you share what is the style that you want to change, we might consider adding such property into our theme that can easily allow you to set a particular style like the color.
Good morning. Thank you for your reply.
I understand I can use the class to style the message. That's done.
The question is if that would affect another style of the grid that is NOT the "empty message" along with it.
In this particular case I'm working with the class .igx-grid__tbody-message.
To go ever further, it would be useful to have Documentation to the classes available for the entire grid and what they affect.