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");
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:
Currently, it takes around 5 seconds to load the RadSpreadsheetRibbonBar.
Please run the project and compare the load time when clicking the two buttons in the main form.
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:
Import the attached document in RadSpreadsheet:
Expected result: centered text like in MS Excel:
Import the attached document and zoom in/out:
Expected result: the whole text should be fully visible like in MS Excel:
Steps to reproduce:
1. Handle the MessageShowing event like this:
private void SpreadsheetElement_MessageShowing(object sender, Telerik.WinForms.Controls.Spreadsheet.MessageShowingEventArgs e)
{
e.IsHandled = true;
}
2. Protect the Workbook
3. Start the app and paste with the context menu
Actual: A dialog is shown
Hi,
if you add a Style to a cell containing a "\n" (which I am forced to use, since text wrap does not work either) the style won't apply.
To reproduce just add a radspreadsheet to a form
public Form1()
{
InitializeComponent();
Workbook workbook = new Workbook();
radSpreadsheet1.Workbook = workbook;
Worksheet worksheet = workbook.ActiveWorksheet;
CellStyle style = workbook.Styles.Add("HeaderStyle");
style.IsBold = true;
worksheet.Cells[0, 0].SetValue("first\ncell");
worksheet.Cells[0, 1].SetValue("second cell");
worksheet.Cells[0, 0, 0, 1].SetStyleName("HeaderStyle");
}
Regards,
Markus
The UI behaivor of drag selection shows inconsistent behavior between WinForm vs WPF/Excel.
When you drag some cells for selection and keep dragging to the right (getting the out scope), the control scrolls to the right.
This behavior is common in Winform/WPF/Excel.
When you drag backward (to the left), WPF controls scroll back and so is Excel, while Winform controls does not scroll
Same thing for top and bottom scroll. Winform Spreadsheet control does not scroll. It may scrolls only to the right.
Another Caveat I see meanwhile is that when you scroll backwards until the row area, the pointer become row-resize pointer, or so
If you keep mouse moving around, it sometimes makes a horizontal line (possibly a guide for row resize?)
The issue in this case is that, it does not remove itself. the horizontal line stays there. It is not very annoying (as it is thin horizontal line) but is still a bug.
To reproduce,
create a empty Winform app, with the RadSpreadsheet Control, and Run
Drag from row C3 and to the right (around the scrollbar) the control scrolls to the right (this is not quite smooth though..)
Scroll right to AZ3 say, and drag backward back to C3, this now does not scroll back.
Same for top and bottom.
Do the same for WPF, it now works as expected
Do the same for MS Excel, it now works as expected.