We have a problem creating an Excel file with Telerik.Windows.Documents.Spreadsheet.
In our last release for our customers we used Telerik WPF version 22.2.613.40 (Spreadsheet DLL) When calling the following line of code
m_Worksheet.Cells[m_CurrentRowIndex, m_CurrentColumnIndex].SetValue("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111 111111111111111111111111111111111111"); the CellValueType is set to text and the Value is correct. We have now switched our project to .NET 7 and Telerik WPF to version 2023.2.519.70. We discovered that this line of code no longer works. The CellValueType is now Number and the Value Infinity Have you changed anything internally? How can we solve the problem now?
The numeric box that allows you to select the "to" page in the PrintPreviewControl is clipped when the "Pages:" and "to" strings are translated to a language where these words are longer. For example, this reproduces with Dutch culture which uses the "Pagina's:" and "naar" texts.
To work this around, you can get the Grid panel that hosts the content and increase the Width of one of its ColumnDefinitions.
private void PrintPreviewControl_Loaded(object sender, RoutedEventArgs e)
{
var printPreview = (PrintPreviewControl)sender;
var rootGrid = printPreview.FindChildByType<Grid>();
rootGrid.ColumnDefinitions[0].Width = new GridLength(355);
}
The horizontal ScrollBar of RadSpreadsheet is missing the bottom border of its track. Additional to that there is a slight offset between the right end of the viewport and the right button of the ScrollBar.
To work this around, set the Margin of the horizontal ScrollBar to 0, and modify its ControlTemplate so that it adds a bottom border for the track's RepeatButton elements.
private void RadSpreadsheet_Loaded(object sender, RoutedEventArgs e)
{
var spreadsheet = (RadSpreadsheet)sender;
var scrollBar = spreadsheet.ChildrenOfType<ScrollBar>().FirstOrDefault(x => x.Name == "HorizontalScrollBar");
scrollBar.Margin = new Thickness(0);
scrollBar.Template = (ControlTemplate)this.Resources["MyCustomScrollBarTemplate"];
}