NoRecordsTemplate Not Working

3 posts, 1 answers
  1. Eric
    Eric avatar
    2 posts
    Member since:
    Jul 2018

    Posted 06 Jul 2018 Link to this post

    I have a RadGrid bound to a ClientDataSource, but when no records are returned, the grid's NoRecordsTemplate does not display (it's just an empty grid).  I've tried various workarounds without any success.  I've tried setting the grid's datasource to an empty array in the RadClientDataSource OnDataParse event.  I've tried explicitly setting EnableNoRecordsTemplate = "true", and I've tried setting NoMasterRecordsText in the MasterTableView, but nothing seems to work.

    Any idea what I could be missing?

  2. Answer
    Attila Antal
    Admin
    Attila Antal avatar
    547 posts

    Posted 16 Jul 2018 Link to this post

    Hi Eric,

    You can take a look at the sample project I have attached. It consists of a NoRecordsTemplate inside RadGrid that is bound on client side. You may compare it with your project to see whether there are  differences between the two.

    If the issue still persist, I would advise modifying my sample to produce the error and send it back to us via a formal support ticket where my colleagues will investigate it further.

    Kind regards,
    Attila Antal
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Eric
    Eric avatar
    2 posts
    Member since:
    Jul 2018

    Posted 16 Jul 2018 in reply to Attila Antal Link to this post

    Thanks, Attila!

    Looks like I have some weird issue going on with my column sizing. The NoRecordsTemplate doesn't show, unless I resize the columns like this:

    var columns = radGridKitsMTV.get_columns();
    for (var i = 0; i < columns.length; i++) {
        columns[i].resizeToFit(false, true);
    }

     

    For whatever reason, that makes it work.  It's almost like the text from the NoRecordsTemplate is being put into a column that was too compressed to display.  Thanks for the demo project.  That helped.

Back to Top