The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team December 31, 2004 08:31 PM UTC
You can use the TableDescriptor.Columns[..].Width property.
this.gridGroupingControl1.TableDescriptor.Columns["Col1"].Width = 200;
AAAnthony AvellaJanuary 3, 2005 03:04 PM UTC
Thanks.
Now, I have two questions about cell fonts:
1- If you add the grid to your GUI at design time, you can set 3 different font properties - font style (bold, italic, etc...), font size and the actual font itself (Arial, Sans Serif, etc...). Since I''m creating the grid programatically, I need to set these font properties programatically. I''m able to set the first two, but I cannot set the third. How do I do this?
2- I''m trying to set the above mentioned properties for my whole grouping grid as well - both summary and detail cells.
If I use the following lines of code during grid initialization, the desired settings do not appear in the grid:
grid.Appearance.GroupCaptionSummaryCell.Font.Size = 8;
grid.Appearance.GroupCaptionSummaryCell.Font.Bold = false;
grid.Appearance.GroupCaptionCell.Font.Size = 8;
grid.Appearance.GroupCaptionCell.Font.Bold = false;
grid.Appearance.RecordFieldCell.Font.Size = 8;
grid.Appearance.RecordFieldCell.Font.Bold = false;
But, if I use the following lines of code in the QueryCellStyleInfo event handler, the desired results do appear in the grid:
e.Style.Font.Size = 8;
e.Style.Font.Bold = false;
Is there any way I can use the first method so I can avoid using the second one and calling those two lines of code with every cell?
Thanks.
ADAdministrator Syncfusion Team January 3, 2005 03:59 PM UTC
1) try setting the Font.Facename property.
grid.Appearance.RecordFieldCell.Font.Facename
2) grid.Appearance.RecordFieldCell is only every other record line. So, you would also have to set grid.Appearance.AlternateRecordFieldCell as well. If the appropriate Appearances are set, then you should not have to set the styles again in QueryCellStyleInfo unless you want to override the initial Appearance settings.