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
785
ResolveSectionHeaderView when datasource is empty
posted

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.

Parents
No Data
Reply
  • 40030
    Offline posted

    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

    GridSample.zip
Children