首页 > 解决方案 > 如何在 Syncfusion Gridview 中更改列标题字体大小?

问题描述

我有一个同步网格。我想更改列标题的字体大小。我正在使用以下代码。但字体大小保持不变

 private void IncreaseGridFontSize(int size)
    {
        Font fontIncr = new Font(Theme.Current.MainFont.FontFamily, size, FontStyle.Regular);

        this.gridMarketWatch.Appearance.ColumnHeaderCell.Font.Size = size;

        //To resize the column header's width 
        this.gridMarketWatch.TableModel.ColWidths.ResizeToFit(GridRangeInfo.Row(this.gridMarketWatch.TableControl.TopRowIndex - 1), GridResizeToFitOptions.IncludeHeaders);

        //To resize the column header's row height.  
        this.gridMarketWatch.TableModel.RowHeights.ResizeToFit(GridRangeInfo.Row(this.gridMarketWatch.TableControl.TopRowIndex - 1), GridResizeToFitOptions.IncludeHeaders); 


    }

在此处输入图像描述

怎么做?

标签: c#syncfusiongridgroupingcontrol

解决方案


推荐阅读