GridControl如何设置多维表头高度与字体

兵工厂三剑客 2016-04-19 05:19:35
如图:

是在C#WinForm里面用的GridControl。
我想设置表格的表头的高度与字体,该如何设置。
...全文
527 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
兵工厂三剑客 2016-04-21
  • 打赏
  • 举报
回复
没有人帮忙解答下吗。
baidu_24214803 2016-04-21
  • 打赏
  • 举报
回复

/// <summary>
        /// 获取表格所有GridBand
        /// </summary>
        /// <param name="col"></param>
        /// <param name="list"></param>
        /// <returns></returns>
        protected ArrayList GetGridBandCollection(GridBandCollection col,ArrayList list)
        {
            foreach (GridBand band in col)
            {
                list.Add(band);
                if (band.Children.Count > 0)
                {
                    GetGridBandCollection(band.Children, list);
                }
            }
return list;
        }
  
需要设置字体的地方:
     ArrayList list = new ArrayList();
                list = GetGridBandCollection(bandedGridView1.Bands,list);
                foreach (GridBand band in list)
                {
                    band.AppearanceHeader.Font = fd.Font;
                }
设置高度:
bandedGridView1.BandPanelRowHeight=50;;

110,531

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧