Hello Everyone,
When there are no rows in the XamDatagrid(WPF) to display, the column headers disappear. Does any one have any idea how to make the column headers stay on the grid, even if there are no rows? Your help is really appreciated.
were you able to fix this, I have the same Issue.
Please let me now how you solved it.
Thanks,
Bob
Hello Alex,
Thanks for your response. I am using a Collection of objects to display in the Xamgrid. But the column headings displayed are not auto generated. They are defined by me in the Xaml. The data source is bound as IEnumberable to be generic. So when there are values, there is no issues for the data to be displayed. When there is nothing in the collection of objects, the header goes away as well.
dataGrid.DataSource = dataSource
as System.Collections.IEnumerable;
Hello,
The XamDataGrid uses the type of the underlying data object that you bind to. If you are using a collection, the XamDataGrid can still display generate headers based on the type of the collection, for example :
xamDataGrid1.DataSource = new List<Person>();