Hello,
So here's what happens. I create a workbook and a worksheet in that wb which I assign as the workbook of a RadSpreadSheet by RadSpreadSheet..Workbook = wb
The first time I assign a name to the first (and only sheet) created in the creation of the wb, the name does appear on that sheet.
Then some code takes this workbook ByVal, creates a new Sheet, makes that sheet the wb's ActiveWorksheet and then changes the ws's name.
You can see in the debugging that the worksheet does have the new name i put there ("2018-05"), but visually this 2nd worksheet has the default name "sheet 2".
Then that wb which is returned by the function is assigned as the RadSpreadSheet's workbook
If I run the code again, so a 3rd sheet is created, then the 3rd sheet will visually have the default name "sheet 3", however in the debugger it says "2018-06" as its name; but most importantly, now sheet 2 has magically changed to what I was seeing its name to be in the debugger ("2018-05").
I'm assuming that If I'm changing the sheet names at runtime, I need to call some method on the Workbook element or something like that in order to update the names. I just couldn't find which method to call.
Best regards,
Ioannis Mamalikidis.
I have implemented the ListDataValidationRule code to add a dropdownlist to the spreadsheet. Based on the code I can find and the searching I have conducted, it seems to be correct, however the dropdown does not appear in the control.
The dropdown list does appear in Excel when I export the file.
Dim Context As ListDataValidationRuleContext = New ListDataValidationRuleContext(CurrentWorksheet, CurrentCellIndex)
Please follow the steps:
1. Run the attached sample project.
2. Move the form to a monitor with 125% DPI scaling.
3. Resize the form to make the spreadsheet bigger. You will notice that the column/row headers are missing for the last column/row headers.
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) { }
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.
To reproduce: - Open the first look example. - Choose Save from the backstage button. - Currently, the default is PDF, It should be xlsx.
Workaround: Handle the MouseWheel event of the control private void RadSpreadsheet1_MouseWheel(object sender, MouseEventArgs e) { int offset = this.radSpreadsheet1.SpreadsheetElement.VerticalScrollBar.SmallChange * 3; int x = e.Delta < 0 ? offset : -offset; this.radSpreadsheet1.SpreadsheetElement.VerticalScrollBar.ClampValue = true; this.radSpreadsheet1.SpreadsheetElement.VerticalScrollBar.Value += x; RadWorksheetEditor editor = this.radSpreadsheet1.SpreadsheetElement.ActiveSheetEditor as RadWorksheetEditor; if (editor != null) { IRadWorksheetEditorPresenter presenter = (IRadWorksheetEditorPresenter)editor.GetType().GetField("activePresenter", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(editor); presenter.SetVerticalOffset(presenter.VerticalOffset + x); editor.InvalidateMeasure(true); } }
1.Make the sheet protected
2. Paste using Ctrl+V
The first message shows:
Then: