Always show FooterTemplate, even no data

后端 未结 3 1509
太阳男子
太阳男子 2020-12-16 22:24

Is there a short way to make a FooterTemplate (in a GridView) always visible, even when DataSource is empty?

3条回答
  •  盖世英雄少女心
    2020-12-16 22:54

    If you want it to always display, regardless of content, can't you just put the footer html outside the GridView, instead of in the FooterTemplate?

    If that's not an option for some reason, then you can either add an null row to your data source if it's empty, or subclass the GridView & override the default behaviour.

    Those are the only options I'm aware of (although its been a while since the last time I used a GridView).

提交回复
热议问题