Current filter:
                                You should refresh the page.
                                  • Im using Blazor Server  and a DxDataGrid. I need to change the text  "No data to display"  ¿How can i achieve this?

                                1 Solution

                                Creation Date Importance Sort by


                                Thank you for your interest in our Blazor components. Currently, our DxDataGrid doesn't provide localization or a built-in way to change an empty row text, so you can use the following workaround:

                                1. Set a marker CSS class and add the @ref attribute:
                                <DxDataGrid ... @ref="grid" CssClass="my-css">... </DxDataGrid>
                                2. Override the OnAfterRenderAsync method to call a JS function that would change text for an empty string:
                                protected override async Task OnAfterRenderAsync(bool firstRender) { await JSRuntime.InvokeAsync<string>("changeNoDataText", grid.CssClass); }
                                3. Use the following function:
                                function changeNoDataText(gridCss) { var emptyRow = document.querySelector('.' + gridCss).querySelector(".dxbs-empty-data-row"); emptyRow.querySelector("div").innerText = "Custom Text"; }

                                I've attached a sample project so you can test how it works.

                                • Customer107223 11.04.2019

                                  Thank you Paul im working on the solution you gave me, but i cant see the attached sample project where can i see it?

                                • Paul V (DevExpress Support) 11.04.2019

                                  It looks like my attachment wasn't uploaded properly. I re-attached it to the original answer.