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.

GridListControl - Items height problem

Thread ID:

Created:

Updated:

Platform:

Replies:

40106 Jan 25,2006 10:17 AM Jan 30,2006 07:09 AM Windows Forms 3
loading
Tags: GridControl
Badri Rajani Kanth
Asked On January 25, 2006 10:17 AM

Hi, I have a GridListControl which is customized as a listbox. I have other normal windows list boxex also. But items height is more in GridListControl when compared to other list boxes. I tried changing the rowheight and font size etc. But no use.. Any input plz.. Rgds Rajani Kanth

Administrator [Syncfusion]
Replied On January 26, 2006 10:59 PM

Badri, you need to set gridListControl.ItemHeight to change the height of rows in the GridListControl. Stefan >Hi, > >I have a GridListControl which is customized as a listbox. I have other normal windows list boxex also. But items height is more in GridListControl when compared to other list boxes. I tried changing the rowheight and font size etc. But no use.. > >Any input plz.. > >Rgds >Rajani Kanth > >

Badri Rajani Kanth
Replied On January 30, 2006 05:20 AM

Hi, If we do that and select an item, you will see the item lower portion as missing..It will not give the user exact look of listbox. Because in list box, items have narrow gap. Whereas in GridListControl, this gap is more and item seems to have a border (as it is a row). Because of which ItemsHeight does not work alone. Rgds Rajani Kanth >Badri, > >you need to set gridListControl.ItemHeight to change the height of rows in the GridListControl. > >Stefan > >>Hi, >> >>I have a GridListControl which is customized as a listbox. I have other normal windows list boxex also. But items height is more in GridListControl when compared to other list boxes. I tried changing the rowheight and font size etc. But no use.. >> >>Any input plz.. >> >>Rgds >>Rajani Kanth >> >>

stanleyj [Syncfusion]
Replied On January 30, 2006 07:09 AM

Hi Badri, I am not sure about the border you mean. Please try this code to see if that helps. this.gridListControl1.Grid.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(Grid_PrepareViewStyleInfo); GridCurrentCell cc; private void Grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { cc = this.gridListControl1.Grid.CurrentCell; if(cc.HasCurrentCellAt(e.RowIndex)) { e.Style.Borders.Top = new GridBorder(GridBorderStyle.Standard); e.Style.Borders.Bottom = new GridBorder(GridBorderStyle.Standard); e.Style.Borders.Left = new GridBorder(GridBorderStyle.Standard); e.Style.Borders.Right = new GridBorder(GridBorderStyle.Standard); } } To resize rows individually try this code below this.gridListControl1.Grid.Model.RowHeights[3] = 20; Best regards, Stanley

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.

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.

;