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
160
Show a message when the grid is empty
posted

I want to show a message (in the grid) when there is no data shown in the grid. I want to include the column headers.

I can see several people have asked this before, but it doesn't seem as if there was ever a solution. For example, this question gives an initial answer, but not a followup that actually works.

I'd love to be able to do something fancy (like below) but I'd be happy with "There are no records to show". 

Fancy empty list message

Parents
  • 30945
    Verified Answer
    Offline posted

    Hello Philip,

     

    Thank you for your post. I have been looking into the appearance that you are trying to achieve and what I can suggest is using approach similar to the one in the forum thread that you have referred. You can use the approach that Petar is suggesting and use the default style of the XamDataGrid as bases in order to be able to keep its original functionality and show the headers, when the XamDataGrid is bound to an empty collection. Also, you can add a ContentControl, in the Template of the XamDataGrid and bind the Content property of the ContentControl to the Tag of the XamDataGrid. This will allow you to set different messages for the different XamDataGrid, by setting their Tag properties. I have created a sample application for you, that shows how you can implement this approach.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    EmptyGridMessage.zip
Reply Children