Telerik Forums
UI for WPF Forum
1 answer
39 views

Hello,

I have an application where the user will drag object values from internal properties within the application into a Spreadsheet control. Think like a CAD package, the user would drag/drop something like circle's radius into a cell. These cells will automatically update as the application updates. I call these dynamic references DynamicDataFields.

The application maintains a collection of these DynamicDataFields. When the user drag/drops these fields from the application into a cell, that cell information is added to the collection.

It is a pretty simple solution and adding hooks for ActiveWorksheetEditor.Commands like Copy, Paste, Cut, Clear. RemoveCellsCommand, etc. - isn't too complicated. 

Basically, the application responds by either,

  1. Adding DynamicDataFields to the collection, or
  2. Removing DynamicDataFields to the collection. 

The biggest thing missing though, is how undo/redo get's handled. I am looking for ways to implement these two actions alongside the built-in undo redo system. Is this something that is possible? Where would I being looking? 

Or does anyone have any better ideas? 

Martin Ivanov
Telerik team
 answered on 05 Feb 2025
2 answers
36 views

I have a license for UI for WPF 2020 R3 SP1 and I can see a dll called Telerik.Windows.Documents.Spreadsheet

I just can not find any way of utilizing this? Wonder if there is no control associated or why it is there?

I just need to be able to display the content of an Excel xlsx file. No edit, no nothing...

hhgm
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 03 Jan 2025
0 answers
69 views

This code behind does not work for importing files that are read only access. No error pops up, just a blank spreadsheet opens up

using (Stream input = new FileStream(this.ExcelDocumentSource, FileMode.Open, FileAccess.Read))
{
    this.Workbook = new XlsxFormatProvider().Import(input);
    //this.Workbook.Protect("telerik");
}

 

Thanks,

Patrick
Top achievements
Rank 1
 asked on 26 Aug 2024
0 answers
97 views

I am registering my own command for the editor to handle copy. It works but users have reported intermittent issues which I've finally tracked down but have not been able to figure out a workaround.

editor.KeyBindings.RegisterCommand(Me.CopyCommand, Key.C, modifierKeys:=ModifierKeys.Control)

The issue is that this only works if the user clicks within the cells of the spreadsheet. If they have clicked on the row or column headers to select cells, or the "select all" in the corner without first clicking within the cells, the command is never called. Once they have clicked in the cells it works to click on the headers, but if they click on a control entirely outside of the spreadsheet, then the problem repeats.

I've tried all kinds of workarounds, including key bindings and event handlers for all the key and previewkey events on the editor, the spreadsheet, and even the header controls. None of them are ever called. Something is eating the events.

 

Edit: I should add I removed all other key bindings and also tried different key combinations and it still doesn't work.

Steve
Top achievements
Rank 1
 updated question on 09 Feb 2024
0 answers
89 views

Hello guys,

I'm using the RadSpreadsheet component since 3 months. I dont have any difficulties with it, except since this week I met a very strange behavior. In my context, the RadSpreadsheet is loaded from a csv file deserialization, some calculation are replaced by the numeric values and some cells are read to say if the results is good or not. I have a UserControl which contains only the RadSpreadsheet and RadFormulaBar components, with a dedicated ViewModel.

The fact is that sometimes, during the process, some NullReferenceException are thrown and the process is cut. The StackTrace provides big traces into the Telerik environment.

Example of piece of code generating the error:

        Private Sub SelectCell(cell As String)
            Dim columnNumber As Integer = 0
            Dim rowNumber As Integer = 0

            AerodynamicTableController.ConvertNumbersToExcelCoordinates(cell, columnNumber, rowNumber)

            Dim selection As Selection = Me.sprdSheet.ActiveWorksheetEditor.Selection
            selection.Select(New CellRange(rowNumber, columnNumber, rowNumber, columnNumber))
        End Sub

The StackTrace (the GetValueAsNonArrayConstantExpression method needs expression variable which is null):

at Telerik.Windows.Documents.Spreadsheet.Expressions.ExpressionExtensions.GetValueAsNonArrayConstantExpression(RadExpression expression, Boolean popupArrayErrors)
   at Telerik.Windows.Documents.Spreadsheet.Expressions.ExpressionExtensions.GetValueAsNonArrayConstantExpression(RadExpression expression, Boolean popupArrayErrors)
   at Telerik.Windows.Documents.Spreadsheet.Expressions.ExpressionExtensions.GetValueAsConstantExpression(RadExpression expression)
   at Telerik.Windows.Documents.Spreadsheet.Model.FormulaCellValue.GetResultValueAsCellValue()
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.CalculateCellProperties(List`1 cellIndexes)
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.UpdateCellContentSizesCache()
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.Measure()
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.Measure(CellIndex frozenCellIndex)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.NormalWorksheetEditorPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.RadWorksheetEditor.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Window.MeasureOverrideHelper(Size constraint)
   at System.Windows.Window.MeasureOverride(Size availableSize)
   at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WindowHostWindow.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at MS.Internal.Documents.DocumentPageTextView.Validate()
   at MS.Internal.Documents.DocumentPageTextView.Validate(ITextPointer position)
   at MS.Internal.Documents.TextViewBase.System.Windows.Documents.ITextView.Validate(ITextPointer position)
   at System.Windows.Documents.TextPointer.GetLineStartPosition(Int32 count, Int32& actualCount)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.CellEditorBase.ScrollToCaret()
   at Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetFormulaBar.SetFormulaBarTextBoxCaretToStart()
   at Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetFormulaBar.UpdateFormulaBarTextFromSelectedCell()
   at Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetFormulaBar.Selection_SelectionChanged(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.SelectionBase.OnSelectionChanged()
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.Selection.OnSelectionChanged()
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.SelectionBase.RaiseSelectionChanged()
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.SelectionBase.SelectInternal(CellIndex fromIndex, CellIndex toIndex, Boolean clearSelection)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.SelectionBase.Select(CellIndex fromIndex, CellIndex toIndex, Boolean clearSelection)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.SelectionBase.Select(CellRange cellRange, Boolean clearSelection)
   at Portal_View.Aerodynamic.SpreadSheetView.SelectCell(String cell) in C:\Users\ng707d2\Documents\aDEV\MAA\Sources\WPFPortal\Portal_View\Aerodynamic\Views\SpreadSheetView.xaml.vb:line 193

For this case, I have cheated using a Try Catch statement and the Thread.Sleep() method, andit seems that this piece of code "cancels" the issue:

            Try
                selection.Select(New CellRange(rowNumber, columnNumber, rowNumber, columnNumber))
            Catch ex As Exception
                Threading.Thread.Sleep(200)
                selection.Select(New CellRange(rowNumber, columnNumber, rowNumber, columnNumber))
            End Try

It's like if the RadSpreadsheet component isn't totally build before I'm using it.

But even using my cheat above, I have another NullReferenceException, but I don't know what's the error source because it's catched by my application CurrentDispatcherUnhandledException event:

   at Telerik.Windows.Documents.Spreadsheet.Expressions.ExpressionExtensions.GetValueAsNonArrayConstantExpression(RadExpression expression, Boolean popupArrayErrors)
   at Telerik.Windows.Documents.Spreadsheet.Expressions.ExpressionExtensions.GetValueAsNonArrayConstantExpression(RadExpression expression, Boolean popupArrayErrors)
   at Telerik.Windows.Documents.Spreadsheet.Expressions.ExpressionExtensions.GetValueAsConstantExpression(RadExpression expression)
   at Telerik.Windows.Documents.Spreadsheet.Model.FormulaCellValue.GetResultValueAsCellValue()
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.CalculateCellProperties(List`1 cellIndexes)
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.UpdateCellContentSizesCache()
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.Measure()
   at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.Measure(CellIndex frozenCellIndex)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.NormalWorksheetEditorPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.RadWorksheetEditor.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Window.MeasureOverrideHelper(Size constraint)
   at System.Windows.Window.MeasureOverride(Size availableSize)
   at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WindowHostWindow.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at MS.Internal.Documents.DocumentPageTextView.Validate()
   at MS.Internal.Documents.DocumentPageTextView.Validate(ITextPointer position)
   at MS.Internal.Documents.TextViewBase.System.Windows.Documents.ITextView.Validate(ITextPointer position)
   at System.Windows.Documents.TextPointer.GetLineStartPosition(Int32 count, Int32& actualCount)
   at Telerik.Windows.Controls.Spreadsheet.Worksheets.CellEditorBase.ScrollToCaret()
   at Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetFormulaBar.SetFormulaBarTextBoxCaretToStart()
   at Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetFormulaBar.UpdateFormulaBarTextFromSelectedCell()
   at Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetFormulaBar.<>c__DisplayClass9.<Cells_CellPropertyChanged>b__8()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

--

You can find below the csv file content used by the deserialization process:

;ZONE;ID;M;Altitude(ft);ISA(ºC);x(m);Flat Plate BL Method;do you know M1?;Cp;M1 Known;h(mm);Gap (mm);w(mm);a (º);r(mm);b (º);forward-rearward;Forward Chamfer;M1;d_fp(mm);Cf1_fp;Cf1_Known;Cf1_option;CD_Step;Sref(m^2);q1/qinf;md;CD(d.c.);;Title30;Title31;Title32;Title33;Title34;Title35;Title36;Title37;Title38;Title39;Title40
1;C1;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,124;0,85;{MF}[AL000_AB0001C_AL_0000_14A].F_Actual;{MF}[AL000_AB0001C_AL_0000_14A].G_Actual;24,8;16,7;0;19,8;RWD;0;0,91;109,8;0,001775;0,002289;Known;"{SF}=CD_STEP(E2;D2;F2;I2;J2;K2;W2;L2;R2;Q2;O2;S2;P2)";432,1;"{SF}=Q1_Q(E2;D2;F2;I2;J2;K2)";1;{SF}=Y2*L2*N2*AA2*1E-06*10000/Z2;{SF}=SUM(AC2:AC11);;;;0,4;-0,4
2;C1;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,124;0,85;{MF}[AL000_AB0001C_AL_0001_14A].F_Actual;{MF}[AL000_AB0001C_AL_0001_14A].G_Actual;24,8;16,7;0;19,7;RWD;0;0,91;109,8;0,001775;0,002307;Known;"{SF}=CD_STEP(E3;D3;F3;I3;J3;K3;W3;L3;R3;Q3;O3;S3;P3)";432,1;"{SF}=Q1_Q(E3;D3;F3;I3;J3;K3)";1;{SF}=Y3*L3*N3*AA3*1E-06*10000/Z3;;;;Kc_Min;0,001777;0,0015;{SF}=AVERAGE(AH3:AI3)
3;C1;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,123;0,85;{MF}[AL000_AB0001C_AL_0002_14A].F_Actual;{MF}[AL000_AB0001C_AL_0002_14A].G_Actual;24,8;16,7;0;19,6;RWD;0;0,91;109,8;0,001775;0,002327;Known;"{SF}=CD_STEP(E4;D4;F4;I4;J4;K4;W4;L4;R4;Q4;O4;S4;P4)";432,1;"{SF}=Q1_Q(E4;D4;F4;I4;J4;K4)";1;{SF}=Y4*L4*N4*AA4*1E-06*10000/Z4
4;C1;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,123;0,85;{MF}[AL000_AB0001C_AL_0003_14A].F_Actual;{MF}[AL000_AB0001C_AL_0003_14A].G_Actual;24,8;16,7;0;19,5;RWD;0;0,91;109,8;0,001775;0,00235;Known;"{SF}=CD_STEP(E5;D5;F5;I5;J5;K5;W5;L5;R5;Q5;O5;S5;P5)";432,1;"{SF}=Q1_Q(E5;D5;F5;I5;J5;K5)";1;{SF}=Y5*L5*N5*AA5*1E-06*10000/Z5
5;C1;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,122;0,85;{MF}[AL000_AB0001C_AL_0004_14A].F_Actual;{MF}[AL000_AB0001C_AL_0004_14A].G_Actual;24,8;16,7;0;19,4;RWD;0;0,91;109,8;0,001775;0,002368;Known;"{SF}=CD_STEP(E6;D6;F6;I6;J6;K6;W6;L6;R6;Q6;O6;S6;P6)";432,1;"{SF}=Q1_Q(E6;D6;F6;I6;J6;K6)";1;{SF}=Y6*L6*N6*AA6*1E-06*10000/Z6
6;C1;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,121;0,85;{MF}[AL000_AB0001C_AL_0005_14A].F_Actual;{MF}[AL000_AB0001C_AL_0005_14A].G_Actual;24,8;16,7;0;19,2;RWD;0;0,91;109,8;0,001776;0,002389;Known;"{SF}=CD_STEP(E7;D7;F7;I7;J7;K7;W7;L7;R7;Q7;O7;S7;P7)";432,1;"{SF}=Q1_Q(E7;D7;F7;I7;J7;K7)";1;{SF}=Y7*L7*N7*AA7*1E-06*10000/Z7
7;C2;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,12;0,85;{MF}[AL000_AB0001C_AL_0006_14A].F_Actual;{MF}[AL000_AB0001C_AL_0006_14A].G_Actual;24,8;2,86;0;19,1;RWD;0;0,91;109,8;0,001776;0,00241;Known;"{SF}=CD_STEP(E8;D8;F8;I8;J8;K8;W8;L8;R8;Q8;O8;S8;P8)";432,1;"{SF}=Q1_Q(E8;D8;F8;I8;J8;K8)";1;{SF}=Y8*L8*N8*AA8*1E-06*10000/Z8
8;C2;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,119;0,85;{MF}[AL000_AB0001C_AL_0007_14A].F_Actual;{MF}[AL000_AB0001C_AL_0007_14A].G_Actual;24,8;2,86;0;19;RWD;0;0,91;109,8;0,001776;0,002432;Known;"{SF}=CD_STEP(E9;D9;F9;I9;J9;K9;W9;L9;R9;Q9;O9;S9;P9)";432,1;"{SF}=Q1_Q(E9;D9;F9;I9;J9;K9)";1;{SF}=Y9*L9*N9*AA9*1E-06*10000/Z9
9;C2;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,117;0,85;{MF}[AL000_AB0001C_AL_0008_14A].F_Actual;{MF}[AL000_AB0001C_AL_0008_14A].G_Actual;24,8;2,86;0;18,9;RWD;0;0,91;109,8;0,001776;0,002455;Known;"{SF}=CD_STEP(E10;D10;F10;I10;J10;K10;W10;L10;R10;Q10;O10;S10;P10)";432,1;"{SF}=Q1_Q(E10;D10;F10;I10;J10;K10)";1;{SF}=Y10*L10*N10*AA10*1E-06*10000/Z10
10;C2;LER_1;0,85;35000;0;10;ESDU_00006;NO;-0,116;0,85;{MF}[AL000_AB0001C_AL_0009_14A].F_Actual;{MF}[AL000_AB0001C_AL_0009_14A].G_Actual;24,8;2,86;0;18,7;RWD;0;0,91;109,8;0,001777;0,00248;Known;"{SF}=CD_STEP(E11;D11;F11;I11;J11;K11;W11;L11;R11;Q11;O11;S11;P11)";432,1;"{SF}=Q1_Q(E11;D11;F11;I11;J11;K11)";1;{SF}=Y11*L11*N11*AA11*1E-06*10000/Z11

The {SF} flag is removed juste after the deserialization. 

The {MF} is replaced by a numeric value during the process.

--

I understand that this case is very strange and complicated to analyze, but do you have any information about these exceptions? I'm using the 2021.1.222.40 Telerik version. I can't really provide you a sample project because it is too big and too sensitive (business environment).

Many thanks.

Valentin M.

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 11 Oct 2023
1 answer
112 views

Hi, 

I am using the RadSpreadsheet user control in WPF.

I am using 2 instances of this control in 2 different windows, with the same underlying Workbook such that modifications to the workbook in one control should be propagated to the other one. The idea is that one control offers a small preview of the workbook, while the second one is used in a separate window with extra-ribbon, formula bar... for more confortable editing (i.e enlarged view).

The problem is that changes from one spreadsheet control are not automatically reflected in the other "untouched" spreadsheet control. Changes are only reflected once I play with the display of the "untouched" spreadsheet control, such as changing the zoom level (via the status bar control) or clicking to change the current active sheet back and forth.

I was wondering if there is a function to force refreshing the radspreadsheet control so the display matches the underlying workbook.

I dont need to have the changes being reflected in real time, it would be enough to use such function to refresh the control used for preview once the larger window with the second control is closing.

Thanks

Laurent
Top achievements
Rank 1
Iron
 answered on 07 Sep 2023
1 answer
128 views

Hi guys,

For my RadSpreadSheet component, I have implemented some custom functions using the FunctionWithArguments implementation. I have a BaseCustomFunction custom class which inherits from the FunctionWithArguments telerik class, and for example, I have a Q1QFunction class which inherits from my BaseCustomFunction, as below:

Imports MAAObject.AerodynamicObject
Imports Telerik.Windows.Documents.Spreadsheet.Expressions
Imports Telerik.Windows.Documents.Spreadsheet.Expressions.Functions

Namespace Aerodynamic.Calculator

    Public Class Q1QFunction
        Inherits BaseCustomFunction

#Region "Properties"

        Public Overrides ReadOnly Property Type As ECustomFunction
            Get
                Return ECustomFunction.Q1_Q
            End Get
        End Property

#End Region

        Public Sub New(name As String, description As String)
            MyBase.New(name, description)
        End Sub

#Region "Methods"

        Protected Overrides Function GetFunctionInfos() As FunctionInfo
            Dim requiredArguments As IEnumerable(Of ArgumentInfo) = New ArgumentInfo() {
                New ArgumentInfo("Altitude_ft", "The value of the Altitude, in ft.", ArgumentType.Number),
                New ArgumentInfo("Mach", "The value of the Mach.", ArgumentType.Number),
                New ArgumentInfo("ISA_ºC", "The value of the ISA, in Celsus degrees.", ArgumentType.Number),
                New ArgumentInfo("Mach_Option", "The value of the Mach Option.", ArgumentType.Text),
                New ArgumentInfo("Cpressure", "The value of the Cpressure.", ArgumentType.Number),
                New ArgumentInfo("Mach1_Known", "The value of the known Mach1.", ArgumentType.Number)
            }

            Dim optionalArguments As IEnumerable(Of ArgumentInfo) = New ArgumentInfo() {}

            Return New FunctionInfo(Me.Name, FunctionCategory.MathTrig, Me.Description, requiredArguments, optionalArguments, 0, True)
        End Function

        Protected Overrides Function EvaluateOverride(context As FunctionEvaluationContext(Of Object)) As RadExpression
            If context.Arguments.Length <> Me.FunctionInfo.RequiredArgumentsCount Then Return Nothing

            Dim altitude As Decimal
            If Not Decimal.TryParse(context.Arguments(0), altitude) Then Return Nothing 'tester le return nothing

            Dim mach As Decimal
            If Not Decimal.TryParse(context.Arguments(1), mach) Then Return Nothing

            Dim isa As Decimal
            If Not Decimal.TryParse(context.Arguments(2), isa) Then Return Nothing

            Dim machOption As String = CStr(context.Arguments(3))
            If Not {"YES", "NO"}.Contains(machOption) Then
                Throw New ExpressionException("Mach_Option parameter must be ""YES"" or ""NO""")
            End If

            Dim cPressure As Decimal
            If Not Decimal.TryParse(context.Arguments(4), cPressure) Then Return Nothing

            Dim mach1Known As Decimal
            If Not Decimal.TryParse(context.Arguments(5), mach1Known) Then Return Nothing

            Return New NumberExpression(AerodynamicCalculator.Q1_Q(altitude, mach, isa, machOption, cPressure, mach1Known))
        End Function

#End Region

    End Class

End Namespace

 

> I have a question about the machOption parameter inside the EvaluateOverride method: is it possible to raise an error if the parameter hasn't the desired value? For example I want to return #VALUE or #REF or another error message, and avoid the calculation of the formula if something provided is wrong.

I tried to use the ErrorExpression or RadExpression base classes, but I can't build them because no New Constructor method is available.

 

Do you know how I can do that?

 

Thank you!

Valentin M.

Dimitar
Telerik team
 answered on 19 Jul 2023
0 answers
127 views
Hello, I am using Radspreadsheet for WPF. I need once I import data, I attach checkbox at the last column in each row.
This is what I have done so far:

            
    int rowCount = importxls.ActiveWorksheet.UsedCellRange.RowCount;
                int lastcolumn = importxls.ActiveWorksheet.UsedCellRange.ColumnCount;

                MessageBoxResult result = MessageBox.Show(rowCount.ToString());

                // Create a new checkbox and set its properties
                CheckBox checkbox = new CheckBox();
                checkbox.IsChecked = true;
                checkbox.VerticalAlignment = VerticalAlignment.Center;
                checkbox.Margin = new Thickness(5, 0, 0, 0);

                DependencyProperty chkBox = DependencyProperty.Register(
                      "Select", typeof(bool), typeof(CheckBox),
                      new UIPropertyMetadata(checkbox.IsChecked));

                for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
                {
                    
                    // Add the checkbox to the current row
                    RowSelection rowSelection = importxls.ActiveWorksheet.Rows[rowIndex];
                    CellIndex cellIndex = new CellIndex(rowIndex, lastcolumn);
                    CellSelection cellSelection = rowSelection.Worksheet.Cells[cellIndex];

                    cellSelection.SetValue(DateTime.Now); //checkbox should be here

                }


Where am I supposed to modify?
Cheruiyot
Top achievements
Rank 1
 asked on 27 Mar 2023
1 answer
124 views

Hi Telerik,

Does Telerik support to export to .xlsb format
OR convert from .xlsx to .xlsb format?

Please let me know the solution for it.

Thanks and Regards,
Muhammad Azhar Shah

Dimitar
Telerik team
 answered on 10 Mar 2023
1 answer
107 views

How can I repeat certain lines on each page of a workbook?

WorksheetPageSetup worksheetPageSetup = worksheet.WorksheetPageSetup;
worksheetPageSetup.PaperType = PaperTypes.A4;
worksheetPageSetup.PageOrientation = PageOrientation.Landscape;
worksheetPageSetup.FitToPages = true;
worksheetPageSetup.CenterHorizontally = true;
worksheetPageSetup.PrintTitle ...

Assignment via PrintTitle does not work.

Dimitar
Telerik team
 answered on 28 Feb 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?