This is a migrated thread and some comments may be shown as answers.

How to change the text : "No records to display" ?

7 Answers 1308 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Suzi
Top achievements
Rank 1
Suzi asked on 26 Aug 2008, 08:16 AM
Hi,

I have an empty RadGrid. A message appears by default when the grid is empty : "No records to display". I would like to change the content of the message. How may I to do please ?

Thank you in advance,

7 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 26 Aug 2008, 08:18 AM
Hello Suzi,

Please check this article:
http://www.telerik.com/help/aspnet-ajax/grdlocalizingtootips.html

Regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Accepted
Shinu
Top achievements
Rank 1
answered on 26 Aug 2008, 09:17 AM
Hi Suzi,

You can also try the following code snippet if you wish to set the custom text in the code behind.

CS:
 RadGrid1.MasterTableView.NoDetailRecordsText = "No records to display in the Master table"
        RadGrid1.MasterTableView.NoDetailRecordsText = "No records to display in the Chill table"


Thanks
Shinu.
0
vikas
Top achievements
Rank 1
answered on 16 Jun 2011, 03:44 AM
Dear Shinu,

Can you please elaborate where do you  mean to place them in code behind?

thank you
0
Princy
Top achievements
Rank 1
answered on 16 Jun 2011, 06:22 AM
Hello Vikas,

You can set the NoRecordsText in PageLoad as shown below.

C#:
protected void Page_Load(object sender, EventArgs e)
   {
       RadGrid1.MasterTableView.NoMasterRecordsText = "your text";
       RadGrid1.MasterTableView.NoDetailRecordsText = "your text";
   }

Also you can directly set the NoRecordsText from aspx as shown below.

aspx:
<MasterTableView  NoMasterRecordsText="your text">
     <DetailTables >
    <telerik:GridTableView   NoDetailRecordsText="your text" >
    </telerik:GridTableView>
</DetailTables>                      
</MasterTableView>

Thanks,
Princy.
0
vikas
Top achievements
Rank 1
answered on 16 Jun 2011, 10:59 PM
Dear princy,


Thank you
0
Ingemar
Top achievements
Rank 1
answered on 25 Oct 2016, 09:51 AM
NoDetailRecordsText in MasterTableView seems to make no difference for me. I am getting the output "No records to display." regardless of what I am putting in there.
0
Viktor Tachev
Telerik team
answered on 28 Oct 2016, 08:10 AM
Hi Ingemar,

Note that if you have defined a NoRecordsTemplate for the GridTableView it will be displayed. In that case the NoMasterRecordsText property will have no effect. In that scenario you can enter the custom message in the NoRecordsTemplate:


<MasterTableView  >
    <NoRecordsTemplate>
        Custom text
    </NoRecordsTemplate>
     
     
</MasterTableView>


If you prefer to use the NoMasterRecordsText property, remove the NoRecordsTemplate.


<MasterTableView  NoMasterRecordsText="custom no records text">
     
     
</MasterTableView>



Regards,
Viktor Tachev
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
Grid
Asked by
Suzi
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Shinu
Top achievements
Rank 1
vikas
Top achievements
Rank 1
Princy
Top achievements
Rank 1
Ingemar
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or