Is it possible to change "No data to display" message shown on Ag-grid? I would like to set it to another custom message.
Asked
Active
Viewed 134 times
0
-
1Does this answer your question? [How can I change 'no rows to show' text programmatically in ag-grid?](https://stackoverflow.com/questions/55739686/how-can-i-change-no-rows-to-show-text-programmatically-in-ag-grid) – Tanner Apr 21 '23 at 15:00
-
No, unfortunately it does not. It just adds an overlay on top of the grid. I would like to change the message without adding the overlay. – developer Apr 24 '23 at 10:02
1 Answers
0
You can use localeText
Check all locale data(en)
Example:
// Demo: https://plnkr.co/edit/V5M8va7pvVp0IH61?open=app%2Fapp.component.ts
@Component({
selector: 'my-app',
template: `<div class="example-wrapper">
<ag-grid-angular
[columnDefs]="columnDefs"
[localeText]="localeText"
[rowData]="rowData"
></ag-grid-angular>
</div>`,
})
export class AppComponent {
private gridApi!: GridApi<IOlympicData>;
...
public localeText: { [key: string]: string } = {
noRowsToShow: "No data to display"
}
Hope it helps!

jyangca
- 582
- 2
- 11