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.
I using the GridControl (3.201.1.0).
I am setting the new font in QueryCellInfo as follows:
Private Sub NAGrid_QueryCellInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs) Handles MyBase.QueryCellInfo
Dim selNA As NA
'' Apply the style on this cell.
If e.RowIndex > 0 AndAlso e.ColIndex > 0 Then
selNA = _GridData.Item(_Note_Flag, e.RowIndex - 1)
If Not selNA Is Nothing Then
Dim gf As New GridFontInfo(NAController.GetFont(selNA))
e.Style.Font = gf
End If
End If
End Sub
The font information is retrieved from an external object collection. This is all being triggered by the user modifying the font and then updating the object collection. After object collection has been updated I call Me.grdNotes.RowHeights.ResizeToFit(GridRangeInfo.Table)
The font is changed, but the ResizeToFit does not happen. I have tried to refresh the grid, invalidate the grid, set focus, but nothing works.
Only when I click on the area near the cell border that would drag the cell does the resize occur. I don''t understand why I can''t make that happen through code.
Per
ADAdministrator Syncfusion Team June 1, 2005 07:52 PM UTC
Is there a call to grid.BeginUpdate that has not be closed off by a call to grid.EndUpdate. If so, this may affect the grid doing its grid.RowHeights.ResizeToFit code. You can check this by testing grid.Updating before your ResizeToFit call.
Another thing to try is between where youhave set teh font and where you call ResizeToFit, try calling grid.ResetVolatileData to see if that will affect this program.
If you can upload a sample showing the problem, we can try to spot the problem here.
ADAdministrator Syncfusion Team June 1, 2005 09:10 PM UTC
Thanks Clay,
grid.ResetVolatileData() fixed the issue.
Per
>Is there a call to grid.BeginUpdate that has not be closed off by a call to grid.EndUpdate. If so, this may affect the grid doing its grid.RowHeights.ResizeToFit code. You can check this by testing grid.Updating before your ResizeToFit call.
>
>Another thing to try is between where youhave set teh font and where you call ResizeToFit, try calling grid.ResetVolatileData to see if that will affect this program.
>
>If you can upload a sample showing the problem, we can try to spot the problem here.