When i try to print my grid i have this error: "Value cannot be null."
This is my code:
SfDataGrid dataGrid = new SfDataGrid();
dataGrid.Columns.Add(new GridTextColumn() { HeaderText = "Order ID", MappingName = "OrderID" });
dataGrid.Columns.Add(new GridTextColumn() { HeaderText = "Customer ID", MappingName = "CustomerID" });
dataGrid.Columns.Add(new GridTextColumn() { HeaderText = "Customer Name", MappingName = "CustomerName" });
dataGrid.Columns.Add(new GridTextColumn() { HeaderText = "Country", MappingName = "Country" });
dataGrid.Columns.Add(new GridNumericColumn() { HeaderText = "Unit Price", MappingName = "UnitPrice" });
dataGrid.PrintSettings = new PrintSettings();
dataGrid.PrintSettings.PrintPageOrientation = PrintOrientation.Portrait;
dataGrid.Print();