We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

customize "No records to display" TD in grid

Hi, I'm trying to customize the 'No records to display' value and style when there's no data in the Grid.

When I try to access, it's undefined or some long objects.

Could you let me know how to change 'No records to display' text value and css style such as 'height' of the td?

Thank you.

Kind Regards,

1 Reply

MS Mani Sankar Durai Syncfusion Team May 24, 2017 01:39 PM UTC

Hi Dongil, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and based on your requirement we have prepared a sample that can be downloaded from the below link. 
In this sample we have customized the “No records to display” using Locale property in grid.  
Refer the code example. 
@(Html.EJ().Grid<object>("Localization") 
... 
 
        .Locale("de-DE") 
 
       .Columns(col => 
        { 
 
            ... 
 
        }) 
 
) 
<script type="text/javascript"> 
 
ej.Grid.Locale["de-DE"] = { 
    EmptyRecord: "Keine Aufzeichnungen angezeigt", 
    ... 
 }; 
 
 
</script> 

Also to change the height of particular td element we suggest you to use the cssClass in grid. 
Refer the code example. 
<style> 
   
    .rowchange .e-gridcontent td{ 
        height:30px; 
    } 
</style> 
@(Html.EJ().Grid<object>("Localization") 
... 
      .CssClass("rowchange") 
 
       ... 
        }) 
 
) 
 

Note: To use the Localization for the grid please refer the corresponding locale file in the script section under ej.web.all.min.js file 

Also we can get the corresponding culture file from the following location. 

 
Refer the documentation link. 
 
Please let us know if you need further assistance. 
 
Regards, 
Manisankar Durai 


Loader.
Live Chat Icon For mobile
Up arrow icon