c# - 如何在 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);
}
怎么做?
解决方案
推荐阅读
- python - 以升序和逆序打印正整数范围 - Python
- javascript - 意外的令牌 / 在位置 0 Nodejs 的 json 中
- javascript - 我的 javascript 代码有问题 - 计算机必须猜测我输入的数字值
- python - Simpy 获取正在等待资源释放的元素
- emacs - tmux 覆盖 emacs 快捷方式
- php - ( sdonate) 1067 /var/www/donate/install.php 中“过期时间”的默认值无效:
- vuex - 页面加载突变 [Nuxt] [Vuex]
- batch-file - 如何使用批处理文件解压缩 ZIP 存档文件?
- angular - ngx-chips:无法从 autocompleteItems 添加第二个标签
- swift - 类型转换导致结构值改变(Swift)