To reproduce: - Open the first look example. - Choose Save from the backstage button. - Currently, the default is PDF, It should be xlsx.
To reproduce: please refer to the attached gif file demonstrating how to replicate the problem with the Demo application. Scroll with the mouse wheel and you will notice the the row index disappears until you click a cell. Using the thumb will behave as expected. Workaround: this.radSpreadsheet1.SpreadsheetElement.VerticalScrollBar.ValueChanged+=VerticalScrollBar_ValueChanged; private void VerticalScrollBar_ValueChanged(object sender, EventArgs e) { this.radSpreadsheet1.SpreadsheetElement.InvalidateMeasure(true); }
To reproduce: - Add a spreadsheet and add ribbon bar from the smart tag. - Start the application. Workaround: protected override void OnShown(EventArgs e) { base.OnShown(e); var parameter = 11; this.radSpreadsheet1.SpreadsheetElement.CommandDescriptors.SetFontSize.Command.Execute(parameter); FontFamilyInfo parameter1 = new FontFamilyInfo(new System.Windows.Media.FontFamily("Calibri")); this.radSpreadsheet1.SpreadsheetElement.CommandDescriptors.SetFontFamily.Command.Execute(parameter1); }
Hello,
So, I'm testing the Telerik suite, part of which is the RadSpreadSheet. I'm currently using the 30 days trial.
So, when I'm debugging it and I'm instantiating a new form that contains the RadSpreadSheet, the programme will about 50% of the time create an exception of object reference not set to an instance of an object
Now, I've only noticed this with forms that contain a radspreadsheet but it could have nothing to do with it.
What always happens before I get the exception is that the reminder to buy a Telerik License appears (the programme halts until I choose an option) and when the dialogue disappears, the exception happens.
Please note that if I just push "F5" again in VS, without changing anything anywhere, so after the crash immediately debug (F5) again, the exception will not occur.
Ideally we should expose the events in the RadPrintDocument object. Workaround handling the PrintPreview method: private void button1_Click(object sender, EventArgs e) { RadPrintDocument printDocument = new RadPrintDocument(); IPrintable printManager = typeof(RadSpreadsheetElement).GetProperty("PrintManager", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.radSpreadsheet1.SpreadsheetElement) as IPrintable; printDocument.AssociatedObject = printManager; printDocument.BeginPrint += PrintDocument_BeginPrint; printDocument.PrintPage += PrintDocument_PrintPage; printDocument.EndPrint += PrintDocument_EndPrint; printDocument.QueryPageSettings += PrintDocument_QueryPageSettings; SpreadsheetPrintPreviewDialog printPreviewDialog = new SpreadsheetPrintPreviewDialog(printDocument); printPreviewDialog.ThemeName = this.radSpreadsheet1.ThemeName; printPreviewDialog.ShowDialog(); } private void PrintDocument_QueryPageSettings(object sender, System.Drawing.Printing.QueryPageSettingsEventArgs e) { } private void PrintDocument_EndPrint(object sender, System.Drawing.Printing.PrintEventArgs e) { } private void PrintDocument_BeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e) { } private void PrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { }
RadSpreadsheet must support printing using RadPrintDocument.
Set the Print Area as described here: https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/worksheetpagesetup
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 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()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?
How to reproduce: check the attached project and the remaining memory after disposing the forms.
This is possible in WPF
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; } } } }