110,531
社区成员
发帖
与我相关
我的任务
分享
/// <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;;