This is a migrated thread and some comments may be shown as answers.

Font size not changing

1 Answer 158 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Finn
Top achievements
Rank 1
Finn asked on 02 Jul 2008, 02:19 AM

What do I have to do to make font size changes take effect?

Seems the size remains unchanged no matter if I change it at design time or at run time.

I tried this:
Me.RadGridView1.Font = New System.Drawing.Font("Arial", 3.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Compare the amount of data shown on a MS ListView control to the RadGridView control.

Also, any way to speed up loading of data. Takes about 5 times as long than loading a ListView in VB6 with the same data. 

With RadGridView1
            .GridElement.BeginUpdate()
            Dim command As OleDbCommand
            command = New OleDbCommand("SELECT * FROM FinalSettings")
            command.Connection = New OleDbConnection(My.Settings.WorkSpaceMgrConnectionString)
            command.Connection.Open()
            .MasterGridViewTemplate.LoadFrom(command.ExecuteReader())
            command.Connection.Close()
            .GridElement.EndUpdate()
End With

Finn

 

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 02 Jul 2008, 11:00 AM
Hello Finn,

Thank you for contacting us.

We recommend using themes created with the Visual Style Builder tool for changing the visual style of RadControls. You can find more about the VSB here:

http://www.telerik.com/support/videos/videos-list/b220i-kcd.aspx
and here:
http://www.telerik.com/help/winforms/vsb_overview.html

To change the font used in cells in RadGridView through code, you should process the CellFormatting event. This event is fired every time when a cell needs to update its visual state. The following code snippet demonstrates this behavior:

 
font = New System.Drawing.Font("Arial", 3.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))  
 
 
Private Sub radGridView1_CellFormatting(ByVal sender As ObjectByVal e As CellFormattingEventArgs) 
    e.CellElement.Font = font 
End Sub 
 


I hope this helps. Please let me know if you need further assistance.

Sincerely yours,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Finn
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or