Print Preview Key Press Event

2 posts, 0 answers
  1. Saif
    Saif  avatar
    30 posts
    Member since:
    Apr 2014

    Posted 22 Jun 2014 Link to this post


    I want to know how to apply the key press on print preview style of the scheduler.
    If user press arrow up/down it will go to next/previous page.

  2. Stefan
    Stefan avatar
    2891 posts

    Posted 23 Jun 2014 Link to this post

    Hello Saif,

    Thank you for writing.

    Here is how you can extend the print preview dialog in order to achieve your requirement: 
    RadPrintDocument document = new RadPrintDocument();
     private void radButton1_Click(object sender, EventArgs e)
         document.AssociatedObject = radScheduler1;
         MyRadPrintPreviewDialog dialog = new MyRadPrintPreviewDialog();
         dialog.Document = document;
     class MyRadPrintPreviewDialog : RadPrintPreviewDialog
         protected override void OnLoad(EventArgs e)
             CommandBarTextBox txtBox = this.ToolCommandBar.Rows[0].Strips[1].Items[2] as CommandBarTextBox;
             txtBox.KeyDown += txtBox_KeyDown;
         void txtBox_KeyDown(object sender, KeyEventArgs e)
             if (e.KeyCode == Keys.Down)
                 if (this.printPreviewControl.StartPage < this.Document.PageCount)
             else if (e.KeyCode == Keys.Up)
                 if (this.printPreviewControl.StartPage > 0)

    I hope that you find this information useful. Should you have any other questions or suggestions, do not hesitate to contact us.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. DevCraft banner
Back to Top