When the text is set using the following code, the text in a wrapped cell is overlapping.
radSpreadSheet1.ActiveWorksheet.Cells[0, 0].SetValue(@"Blocked flow; potential increase in level in (BLANK); potential to overfill equipment; potential spill or overflow to (BLANK)
Blocked flow; potential increase in level in (BLANK);
potential to overfill equipment; potential spill or overflow to(BLANK)");
radSpreadSheet1.ActiveWorksheet.Columns[0].SetWidth(new ColumnWidth(300, true));
Worksheet worksheet = radSpreadSheet1.ActiveWorksheet as Worksheet;
CellStyle cellStyle = worksheet.Workbook.Styles.Add("Wrap Style", CellStyleCategory.Custom);
cellStyle.IsWrapped = true;
CellRange cr = new CellRange(0, 0, 10, 10);
worksheet.Cells[cr].SetStyleName("Wrap Style");
Currently, the WinForms Spreadsheet doesn't have separators between the column headers:
It would be better to have separators for the headers like the WPF Spreadsheet:
The resize option available in MS Excel is:
MS Excel has this splitter functionality:
Please refer to the attached gif file.
This is the sample code snippet:
public RadForm1()
{
InitializeComponent();
this.radSpreadsheet1.SpreadsheetElement.ActiveWorksheetEditor.MouseClick += ActiveWorksheetEditor_MouseClick;
}
private void ActiveWorksheetEditor_MouseClick(object sender, Telerik.WinControls.Spreadsheet.UI.MouseButtonEventArgs e)
{
Console.WriteLine(DateTime.Now.ToLongTimeString());
var selection = this.radSpreadsheet1.SpreadsheetElement.ActiveWorksheetEditor.Selection.ActiveRange;
if (!selection.IsColumnRange)
{
}
}
At the moment when any of the properties are changed, e.g. the frozen panes, the UI is not notified and you have to export and import the file in order for the UI to pick them up.
Workaround: There are several workarounds:
1. Change the active worksheet and return to the old one
2. Export and import the document
3. Change the workbook of the RadSpreadsheet to a new one, and return the old one after that
4. Freeze the active worksheet using the ActiveWorksheetEditor.FreezePanes() method and freeze all others using the ViewState:
this.radSpreadsheet1.ActiveWorksheetEditor.FreezePanes(new CellIndex(10, 3));
foreach (var worksheet in this.radSpreadsheet1.Workbook.Worksheets)
{
worksheet.ViewState.FreezePanes(5, 5);
}
In Material(Pink,Teal,BlueGrey) themes, the row heading numbers are truncated.
Clicking on a calculated cell leads to the following error and crashes the demo:
Please follow the steps in the VS Designer:
1. Add a RadSpreadsheet and Office2019Dark theme:
2. Set the ThemeName for RadSpreadsheet to Office2019Dark:
3. Run the project. You will see that the row/column headers are not readable:
4. Stop the project and reopen the designer: