Approved
Last Updated: 06 Mar 2018 15:02 by ADMIN
ADMIN
Hristo
Created on: 06 Mar 2018 11:07
Category: Spreadsheet
Type: Bug Report
1
FIX. RadSpreadSheet - the document should be scrolled with the MouseWheel
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);
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments