The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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++;
ADAdministrator Syncfusion Team 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.
UMUmangiAugust 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.
ADAdministrator Syncfusion Team 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.