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);
}
Create an empty project with a RadSpreadsheet. Hide column A and B and try to scroll:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.GetColumnWidth(Int32 columnIndex) at Telerik.WinForms.Controls.Spreadsheet.Worksheets.RadWorksheetEditorPresenterBase.SetHorizontalOffsetInternal(ScrollEventType scrollType, Double value) at Telerik.WinForms.Controls.Spreadsheet.Worksheets.RadWorksheetEditor.SetHorizontalOffsetInternal(ScrollEventType scrollType, Double value) at Telerik.WinControls.UI.RadSpreadsheetElement.ScrollBar_Scroll(Object sender, ScrollEventArgs e) at System.Windows.Forms.ScrollEventHandler.Invoke(Object sender, ScrollEventArgs e) at Telerik.WinControls.UI.RadScrollBarElement.OnScroll(ScrollEventArgs args) at Telerik.WinControls.UI.RadScrollBarElement.CallOnScroll(ScrollEventType scrollType, Int32 oldValue, Int32 newValue) at Telerik.WinControls.UI.RadScrollBarElement.ScrollWith(Int32 step, ScrollEventType scrollType) at Telerik.WinControls.UI.RadScrollBarElement.OnScrollTimer(Object sender, EventArgs e) at Telerik.WinControls.UI.RadScrollBarElement.OnMouseDown(MouseEventArgs e) at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args) at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.DoMouseDown(MouseEventArgs e) at Telerik.WinControls.ComponentInputBehavior.OnMouseDown(MouseEventArgs e) at Telerik.WinControls.Spreadsheet.UI.RadSpreadsheetComponentInputBehavior.OnMouseDown(MouseEventArgs e) at Telerik.WinControls.RadControl.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at Telerik.WinControls.RadControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
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:
Import the attached sample file, right-click on the first cell and select Format Cell:
Expected result: correct cell style should be loaded as it is MS Excel:
Import the attached document:
Expected result: the cell B1 should be rendered with bold text as in MS Excel:
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:
When the HorizontalAxisStroke is not specified, an error occurs during the document's loading.
If you load the attached document in RadSpreadsheet and select the first cell A1, the yellow popup doesn't occur even though it is defined in the document:
Expected result:
Like in WPF RadSpreadsheet:
Like in MS Excel:
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:
In Excel, the cursor changes to look like <-I-> when it is in the correct position to start resizing (column or row), and stays the same when the user is doing the resize - good visual feedback.
In RadSpreadsheet, we get a similar <-I-> cursor when in position to re-size, but this goes away (back to the normal pointer) whilst the user is re-sizing. The re-size operation works just fine, but I don't get the feedback whilst doing it.
Please refer to the two gif files illustrating the behavior in MS Excel and in RadSpreadsheet.