[]
Prints the grid, optionally showing a page setup or print preview dialog.
public bool PrintGrid(string docName, PrintGridFlags flags)
Type | Name | Description |
---|---|---|
string | docName | The document name, which appears on the progress dialogs and on the print job windows. |
PrintGridFlags | flags | Flags that select printing options. |
Type | Description |
---|---|
bool | True if the grid was printed, false if the user canceled the operation before printing started. |
Use the PrintParameters property to set up options such as page orientation and margins, header and footer fonts, etc.
The method returns true if the user started the printing process. If the user clicks cancel while the grid is printing, the method returns true (some pages may be printed anyway depending on the printer settings). To detect canceled jobs, handle the EndPrint event and check the value of the e.Cancel parameter.
Prints the grid, optionally showing a page setup or print preview dialog.
public bool PrintGrid(string docName, PrintGridFlags flags, string header, string footer)
Type | Name | Description |
---|---|---|
string | docName | The document name, which appears on the progress dialogs and on the print job windows. |
PrintGridFlags | flags | Flags that select printing options. |
string | header | String that appears on the top of every page. |
string | footer | String that appears on the bottom of every page. |
Type | Description |
---|---|
bool | True if the grid was printed, false if the user canceled the operation. |
The header and footer strings may contain up to three tab-delimited sections, which are aligned to the left, center, and right of the page. The strings may also contain placeholders that are replaced with the current page number and total number of pages ("{0}" and "{1}").
Use the PrintParameters property to set up options such as page orientation and margins, header and footer fonts, etc.
Prints the grid, optionally showing a page setup or print preview dialog.
public bool PrintGrid(string docName)
Type | Name | Description |
---|---|---|
string | docName | The document name, which appears on the progress dialogs and on the print job windows. |
Type | Description |
---|---|
bool | True if the grid was printed, false if the user canceled the operation. |
Use the PrintParameters property to set up options such as page orientation and margins, header and footer fonts, etc.