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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change Height in GridListControl

Thread ID:

Created:

Updated:

Platform:

Replies:

26641 Mar 29,2005 10:48 AM UTC Apr 5,2005 03:21 PM UTC WinForms 3
loading
Tags: GridControl
Ayman
Asked On March 29, 2005 10:48 AM UTC

i need to change the Row Hieght in GridListControl and when i use ItemHieght or MinResizeRowSize the Hieht Change again automaticaly. so ......... please how can i change Row height.

Administrator [Syncfusion]
Replied On March 29, 2005 01:14 PM UTC

When the GridListControl is initially setup for the first time it is drawn, the row heights are automaticallt set (and this steps on what you tried to do to initially set the size.) One way around this is to subscribe to the GridListControl''s Paint event. Then in the handler code, unsubscribe to teh event so it is only hit once, and there set the default size.
private void ListBox1_Paint(object sender, PaintEventArgs e)
{
	//unsubcribe to the event so it is only done once
	this.ListBox1.Paint -= new PaintEventHandler(ListBox1_Paint);
	this.ListBox1.Grid.Rows.DefaultSize = 50;
}

Ayman
Replied On April 5, 2005 01:31 PM UTC

I''m tring to do that many times but nothing change. and this my code to change this height AddHandler GridList1.Paint, AddressOf Paint_GridList Private Sub Paint_GridList(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) RemoveHandler glstRemarks.Paint, AddressOf Paint_GridList glstRemarks.Grid.Rows.DefaultSize = 1000 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click --i''m trying to do any one of this but nothing happenend glstRemarks.MinResizeRowSize = 1000 glstRemarks.Grid.Rows.DefaultSize = 1000 glstRemarks.ItemHeight = 1000 end Sub In the finally I need it to be row Auto size. thanks with my best regards

Administrator [Syncfusion]
Replied On April 5, 2005 03:21 PM UTC

Here is a little sample showing the Paint event trick working to initially set the row height in a GridListControl. It also has a button that will change the row height on each click. It was done using version 3.0.1.0. What are you doing differently? http://www.syncfusion.com/Support/user/uploads/GLC_RowHeight_81a4d3fa.zip

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

;