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
Right-click an empty cell and select Copy.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentNullException: Value cannot be null.
Parameter name: text
at System.Windows.Forms.Clipboard.SetText(String text, TextDataFormat format)
at System.Windows.Forms.Clipboard.SetText(String text)
at Telerik.WinForms.Controls.Spreadsheet.Clipboards.ClipboardEx.MSClipboardSetText(String text)
at Telerik.WinForms.Controls.Spreadsheet.Clipboards.ClipboardEx.SetTextInternal(String text)
at Telerik.WinForms.Controls.Spreadsheet.Clipboards.ClipboardEx.SetDataInternal(String text, WorksheetFragment fragment)
at Telerik.WinForms.Controls.Spreadsheet.Worksheets.RadWorksheetEditor.Copy()
at Telerik.WinForms.Controls.Spreadsheet.Worksheets.RadWorksheetEditorCommands.<>c.<InitializeCommands>b__575_94(RadWorksheetEditor editor, Object parameter)
at Telerik.WinForms.Controls.Spreadsheet.Commands.RadSheetEditorDelegateCommand`1.ExecuteOverride(Object parameter)
at Telerik.WinForms.Controls.Spreadsheet.Commands.RadSheetEditorCommandBase`1.Execute(Object parameter)
at Telerik.WinControls.UI.RadSpreadsheetElement.<CreateDefaultWorkbookContextMenu>b__184_1(Object <p0>, EventArgs <p1>)
at Telerik.WinControls.RadElement.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
at Telerik.WinControls.UI.RadMenuItem.OnClick(EventArgs e)
at Telerik.WinControls.RadElement.DoClick(EventArgs e)
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.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(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 Telerik.WinControls.UI.RadPopupControlBase.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)
I have a RadSpreadsheet control on a form. It has a good number of cells protected though this behavior is independent of the protection status.
If I click on a cell, move to the cell using the keyboard (up arrow, etc), and then push the delete key the cell formatting is cleared. When the spreadsheet is protected and I hit delete in the same circumstance on an unlocked cell the formatting is cleared and the cell is then locked.
Is there something I am missing or have not set?
To reproduce:
Add the rule from this article and observe the result: Data Validation
Hi,
Using the last release of RadSpreadsheet, I get an exception when the first row is hidden when scrolling with the mousewheel. Attached is a demo.
Thanks,
Megan
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.
Hi Support,
please try set the WorkBook to RadSpreadsheet.
Best regards
Fritz
Add a RadSpreadsheet on the form and try resizing it at design time. You will notice that the control is resized after a considerable delay.
If you Dock the control to Fill and try resizing the form at run you will notice that the layout is incorrect. The attached gif file illustrates the obtained behavior.
Workaround: update the layout after resizing:
public RadForm1()
When you set the AutoSize property to true, the control becomes enormous - Size (5002, 5002).
There is no specific logic for auto-sizing the control. We should either remove the AutoSize property or size the control according to the rows/columns it uses.
Add support for creating Tables and applying tables styles (predefined ones or custom).
I have loaded an excel file into the spreadsheet control from our document database. When a user makes changes and clicks the save button I would like to handle a save process back to our document database of the file.
If a save function can be raised I can save to the document database
If a SavAs fucntion can be raised I can prompt the user to create a new version
Can the control have these two features added please?
Set the Print Area as described here: https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/worksheetpagesetup
RadSpreadsheet must support printing using RadPrintDocument.
Workaround: create a custom input behavior class and manually handle the navigation when holding the Shift key public partial class SpreadsheetForm : Telerik.WinControls.UI.RadForm { public SpreadsheetForm() { InitializeComponent(); FieldInfo behaviorFi = typeof(RadSpreadsheetElement).GetField("inputHandler", BindingFlags.Instance | BindingFlags.NonPublic); behaviorFi.SetValue(this.radSpreadsheet1.SpreadsheetElement, new CustomSpreadsheetInputBehavior(this.radSpreadsheet1.SpreadsheetElement)); } } public class CustomSpreadsheetInputBehavior : SpreadsheetInputBehavior { public CustomSpreadsheetInputBehavior(RadSpreadsheetElement element) : base(element) { } public override void ProcessKeyDown(KeyEventArgs e) { base.ProcessKeyDown(e); if (e.Shift) { switch (e.KeyCode) { case Keys.Left: this.Spreadsheet.ActiveWorksheetEditor.Commands.UpdateActiveSelectionRangeCommand.Execute(MovementType.MoveToPreviousColumn); break; case Keys.Up: this.Spreadsheet.ActiveWorksheetEditor.Commands.UpdateActiveSelectionRangeCommand.Execute(MovementType.MoveToPreviousRow); break; case Keys.Right: this.Spreadsheet.ActiveWorksheetEditor.Commands.UpdateActiveSelectionRangeCommand.Execute(MovementType.MoveToNextColumn); break; case Keys.Down: this.Spreadsheet.ActiveWorksheetEditor.Commands.UpdateActiveSelectionRangeCommand.Execute(MovementType.MoveToNextRow); break; } } } }