We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set Font on GridListControl

Thread ID:

Created:

Updated:

Platform:

Replies:

51675 Nov 10,2006 03:22 PM UTC Nov 14,2006 07:20 PM UTC Windows Forms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 10, 2006 03:22 PM UTC

I tried to set Font on GridListControl.Font and GridListControl.Grid.Font, but it doesn't seem to work.

Can someone please tell me how to change the font on a GridListControl?

Thanks,

Frank

Administrator [Syncfusion]
Replied On November 10, 2006 05:47 PM UTC

Try code like

Me.GridListControl1.Grid.BaseStylesMap("Standard").StyleInfo.Font = New Syncfusion.Windows.Forms.Grid.GridFontInfo(New Font("Arial", 18))

to see if that does what you want.

Administrator [Syncfusion]
Replied On November 10, 2006 11:24 PM UTC

Thanks. That works.

Can you also tell me how to set the row height for all the rows? I tried to set ItemHeight, but it doesn't work.

I'm using version 4.2.0.60.

Thanks again,

Frank

Administrator [Syncfusion]
Replied On November 13, 2006 04:41 AM UTC

Hi Frank,

Use the Grid.DefaultRowHeight property to set the row height of the GridListControl. Here is a code snippet

Me.gridListControl1.Grid.DefaultRowHeight = 50

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On November 13, 2006 01:59 PM UTC

Haneef,
Thanks for your replay. Unfortunately it didn't work. Any other suggestions?
I found out it's due to the fact that I bind the gridlistcontrol to a datatable. If the gridlistcontrol is unbound, i can just set the ItemHeight directly on gridlistcontrol and it will work. Is it a bug?
Thanks,
Frank

Administrator [Syncfusion]
Replied On November 14, 2006 04:37 AM UTC

Hi Frank,

To set the RowHeight of the GridListControl,
You need to handle the Grid.Model.QueryRowHeight event. Here is a code snippet

//form Load...
this.gridListControl1.Grid.Model.QueryRowHeight +=new GridRowColSizeEventHandler(Model_QueryRowHeight);

private void Model_QueryRowHeight(object sender, GridRowColSizeEventArgs e)
{
e.Size = 100;
e.Handled = true;
}

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GRIdListControlRowHeight_bc37df09.zip

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On November 14, 2006 07:20 PM UTC

Cool. Works like a charm. Thanks.
Frank

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;