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

8 posts, 2 answers
  1. Suzi
    Suzi avatar
    85 posts
    Member since:
    Mar 2008

    Posted 26 Aug 2008 Link to this post

    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,
  2. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 26 Aug 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 26 Aug 2008 Link to this post

    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.
  5. vikas
    vikas avatar
    11 posts
    Member since:
    Dec 2008

    Posted 15 Jun 2011 Link to this post

    Dear Shinu,

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

    thank you
  6. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Jun 2011 Link to this post

    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.
  7. vikas
    vikas avatar
    11 posts
    Member since:
    Dec 2008

    Posted 16 Jun 2011 Link to this post

    Dear princy,


    Thank you
  8. Ingemar
    Ingemar avatar
    17 posts
    Member since:
    Apr 2012

    Posted 25 Oct in reply to Princy Link to this post

    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.
  9. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 28 Oct Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017