value does not fall within the expected range

2 posts, 0 answers
  1. Rakesh
    Rakesh avatar
    19 posts
    Member since:
    Feb 2012

    Posted 20 Jun 2012 Link to this post

    I have a RadGridView in Xaml Page. I trying to print it by having border and margin when button is clicked.

    Here is the code..

    public void OnPrint(object sender, RoutedEventArgs e)
            {
                var pd = new PrintDocument();
                pd.PrintPage += (s, args) =>
                                    {
                                        var bordertest = new Border
                                                         {
                                                             Background = new SolidColorBrush(Colors.Brown),
                                                             BorderBrush = new SolidColorBrush(Colors.Orange),
                                                             BorderThickness = new Thickness(1),
                                                             Margin = new Thickness(20),
                                                             Child = CertStatusGrid
                                                         };
                                        var grid = new Grid();
                                        grid.Children.Add(bordertest);
                                                  args.PageVisual = grid; 
                                    };
      
                  
                pd.Print("Employee Certification Data");
    }


    CertStatusGrid is RadGridView Control. when I search for the solution, most of them say its mainly due to repitation of control names in a UserControl Page.

    Here I don't see that problem, Can anyone help to get this resolved.
    Thanks
    Rakesh
  2. Rakesh
    Rakesh avatar
    19 posts
    Member since:
    Feb 2012

    Posted 22 Jun 2012 Link to this post

    Can anyone answer my question please
Back to Top