Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Message for when no data

Is there a built-in way to just show a configurable message below the headers when the datasource contains no data?  I have been building in logic to flip Hidden between a UILabel and the grid, as well as code to position both of them.  It would save some time if this were already built in on the grid.  Thanks!

  • 21795
    Offline posted

    Hello Michael,

    I am just checking about the progress of this issue. Let me know if you need our further assistance on it.

    Thank you for using Infragistics Components.

  • 4940
    Suggested Answer
    Offline posted

    The IGGridView currently doesn't have this feature built-in. I recommend submitting this idea to our NucliOS Ideas page.

    Despite not being built-in, one way you can achieve this is by creating a class that inherits from IGGridViewDataSourceHelper and overriding the gridView:numberOfRowsInSection: method. If the data count is 0 then set the backgroundView of the IGGridView, otherwise remove the backgroundView and return the number of rows. An example is attached to this post demonstrating this solution.

    Note: The IGGridView's backgroundView is automatically resized to match the size of the grid view. The view is placed as a subview of the grid view behind all cells, header views and footer views.