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".
What is result after 2 years?
Hello Philip,
Thank you for your reply. I am very glad that my approach was helpful for you. Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Excellent!
Including this code -- <Grid x:Name="PART_ContentSiteGrid"/> -- was the part I didn't know to do.
Using the Tag property is also a cute idea.
Thank you very much.
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.