Hi,
It is required to get the grid header's height dynamically(grid loaded event). I got the record height by accessing the
DataRecordPresenter.FromRecord(grid.Records[0]).ActualHeight. But not able to get the header height. Please help to get the height of the header.
Regards,
Sasikumar
Hello Sasikumar,
I am checking if this is still an issue for you.
If you require any further assistance please do not hesitate to ask.
Hi Sasikumar,
Thank you for your reply. Could you please explain in details in which scenarios the this.xamDataGrid1.FieldLayouts[0].Fields[0].LabelHeightResolved does not give accurate value ?
Looking forward to hearing from you.
Hi Yanko,
Your solution is works fine, but in some scenarios, by setting height through this property Grid headers not visible. My question here in any case the below code
double headerHeight = this.xamDataGrid1.FieldLayouts[0].Fields[0].LabelHeightResolved may give zero as value. Because got the number of records and record height with this I am adding the header height, what happens is records completly visible but header is missing. Please provide some solution.
I am just checking if you require any further assistance on the matter.
I have been looking into your question and my suggestion is to access the header’s height via some of the XamDataGrid’s field like e.g. :
double headerHeight = this.xamDataGrid1.FieldLayouts[0].Fields[0].LabelHeightResolved;
Please let me know, if you need any further assistance on this matter.