Hi - I've implemented my grids to include buttons in the SectionHeaderView. I've noticed that when there are no items in the grid the Section Header View does not appear. I understand why this is probably happening but I'm wondering if I can avoid rebuilding all my grids to not use the Section Header View.
I tried overriding the IGGridViewDataSourceHelper.NumberOfSections to always be 1, but this did not cause the IGGridViewDelegate.ResolveSectionHeaderView to fire and build my custom buttons.
Any thoughts would be nice if I can avoid re-doing all the implementations of buttons in my grids.
Thanks.
Hi,
As long as you implement the method, it will always display a section header, even if you have only 1 section displayed.
I've attached a sample that does show it working.
Let me know if it doesn't work for you.
-SteveZ
Hey Stephen - So in your sample its returning a results set of 200 items. If you change the line that states:
dsh.Data = IGSalesmanItem.GenerateData (200).ToArray ();
to
dsh.Data = IGSalesmanItem.GenerateData (0).ToArray ();
You will then see that the red section header view does not appear.
Any thoughts on how to still get it to appear when data items in the array are = 0?