When the text is set using the following code, the text in a wrapped cell is overlapping.
radSpreadSheet1.ActiveWorksheet.Cells[0, 0].SetValue(@"Blocked flow; potential increase in level in (BLANK); potential to overfill equipment; potential spill or overflow to (BLANK)
Blocked flow; potential increase in level in (BLANK);
potential to overfill equipment; potential spill or overflow to(BLANK)");
radSpreadSheet1.ActiveWorksheet.Columns[0].SetWidth(new ColumnWidth(300, true));
Worksheet worksheet = radSpreadSheet1.ActiveWorksheet as Worksheet;
CellStyle cellStyle = worksheet.Workbook.Styles.Add("Wrap Style", CellStyleCategory.Custom);
cellStyle.IsWrapped = true;
CellRange cr = new CellRange(0, 0, 10, 10);
worksheet.Cells[cr].SetStyleName("Wrap Style");
Currently, the WinForms Spreadsheet doesn't have separators between the column headers:
It would be better to have separators for the headers like the WPF Spreadsheet:
The resize option available in MS Excel is:
Please add radSpreadsheet RTL support in windows version of Telerik.
Today we testing last trial version , and we see this option inside the component properties , but its not working.
Thank You.
MS Excel has this splitter functionality:
Please refer to the attached gif file.
This is the sample code snippet:
public RadForm1()
{
InitializeComponent();
this.radSpreadsheet1.SpreadsheetElement.ActiveWorksheetEditor.MouseClick += ActiveWorksheetEditor_MouseClick;
}
private void ActiveWorksheetEditor_MouseClick(object sender, Telerik.WinControls.Spreadsheet.UI.MouseButtonEventArgs e)
{
Console.WriteLine(DateTime.Now.ToLongTimeString());
var selection = this.radSpreadsheet1.SpreadsheetElement.ActiveWorksheetEditor.Selection.ActiveRange;
if (!selection.IsColumnRange)
{
}
}
At the moment when any of the properties are changed, e.g. the frozen panes, the UI is not notified and you have to export and import the file in order for the UI to pick them up.
Workaround: There are several workarounds:
1. Change the active worksheet and return to the old one
2. Export and import the document
3. Change the workbook of the RadSpreadsheet to a new one, and return the old one after that
4. Freeze the active worksheet using the ActiveWorksheetEditor.FreezePanes() method and freeze all others using the ViewState:
this.radSpreadsheet1.ActiveWorksheetEditor.FreezePanes(new CellIndex(10, 3));
foreach (var worksheet in this.radSpreadsheet1.Workbook.Worksheets)
{
worksheet.ViewState.FreezePanes(5, 5);
}
Create an empty project with a RadSpreadsheet. Hide column A and B and try to scroll:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at Telerik.Windows.Documents.Spreadsheet.Layout.RadWorksheetLayout.GetColumnWidth(Int32 columnIndex) at Telerik.WinForms.Controls.Spreadsheet.Worksheets.RadWorksheetEditorPresenterBase.SetHorizontalOffsetInternal(ScrollEventType scrollType, Double value) at Telerik.WinForms.Controls.Spreadsheet.Worksheets.RadWorksheetEditor.SetHorizontalOffsetInternal(ScrollEventType scrollType, Double value) at Telerik.WinControls.UI.RadSpreadsheetElement.ScrollBar_Scroll(Object sender, ScrollEventArgs e) at System.Windows.Forms.ScrollEventHandler.Invoke(Object sender, ScrollEventArgs e) at Telerik.WinControls.UI.RadScrollBarElement.OnScroll(ScrollEventArgs args) at Telerik.WinControls.UI.RadScrollBarElement.CallOnScroll(ScrollEventType scrollType, Int32 oldValue, Int32 newValue) at Telerik.WinControls.UI.RadScrollBarElement.ScrollWith(Int32 step, ScrollEventType scrollType) at Telerik.WinControls.UI.RadScrollBarElement.OnScrollTimer(Object sender, EventArgs e) at Telerik.WinControls.UI.RadScrollBarElement.OnMouseDown(MouseEventArgs e) at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args) at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args) 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.DoMouseDown(MouseEventArgs e) at Telerik.WinControls.ComponentInputBehavior.OnMouseDown(MouseEventArgs e) at Telerik.WinControls.Spreadsheet.UI.RadSpreadsheetComponentInputBehavior.OnMouseDown(MouseEventArgs e) at Telerik.WinControls.RadControl.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(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 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)
In Material(Pink,Teal,BlueGrey) themes, the row heading numbers are truncated.