This is a migrated thread and some comments may be shown as answers.

value does not fall within the expected range

1 Answer 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rakesh
Top achievements
Rank 1
Rakesh asked on 21 Jun 2012, 12:59 AM

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

1 Answer, 1 is accepted

Sort by
0
Rakesh
Top achievements
Rank 1
answered on 22 Jun 2012, 04:55 PM
Can anyone answer my question please
Tags
General Discussions
Asked by
Rakesh
Top achievements
Rank 1
Answers by
Rakesh
Top achievements
Rank 1
Share this question
or