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

cells of type static does not show the vertical scrollbar

Thread ID:

Created:

Updated:

Platform:

Replies:

17314 Aug 5,2004 03:24 PM UTC Aug 5,2004 06:37 PM UTC Windows Forms 3
loading
Tags: GridControl
Umangi
Asked On August 5, 2004 03:24 PM UTC

I have a grid which has cell type static. One of the cell displays long text. I want to show vertical scrollbar in that cell but it does not display the scrollbar. Here is the code (Syncfusion.Windows.Forms.Grid.GridControl)panelMessages.Controls[count-1])[9,2].VerticalScrollbar = true; ((Syncfusion.Windows.Forms.Grid.GridControl)panelMessages.Controls[count-1])[9,2].Text = QueryTextBus.GetQueryText(guid); GridModel gridModel =((Syncfusion.Windows.Forms.Grid.GridControl)panelMessages.Controls[count-1]) .Model; GridStyleInfo standard = gridModel.BaseStylesMap["Standard"].StyleInfo; GridBorder border = new GridBorder(GridBorderStyle.Solid, Color.FromArgb(57, 73, 122),GridBorderWeight.Thick); standard.Borders.All = border; standard.CellType = "Static"; gridModel.RowHeights.SetRange(0,gridModel.RowCount-1,21); gridModel.RowHeights[gridModel.RowCount] = 42; count++;

Administrator [Syncfusion]
Replied On August 5, 2004 03:58 PM UTC

The VerticalScrollbar is only used by the TextBox CellType. So, if you need a scrollbar in the cell, you will either have to derive your own cell type or use a TextBox celltype. If you do not want the TextBox to gain edit focus, you could handle the CurrentCellStartEditing event and cancel it if it is this cell.

Umangi
Replied On August 5, 2004 06:15 PM UTC

Is Autosize property of cell is only available for textbox? Because I tried that with WrapText true. But that''s not working >The VerticalScrollbar is only used by the TextBox CellType. So, if you need a scrollbar in the cell, you will either have to derive your own cell type or use a TextBox celltype. If you do not want the TextBox to gain edit focus, you could handle the CurrentCellStartEditing event and cancel it if it is this cell.

Administrator [Syncfusion]
Replied On August 5, 2004 06:37 PM UTC

Autosize only works when your user types into a cell. If you want to programmatically autosize columns, you need to call grid.Model.ColWidths.ResizeToFit.

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

;