[]
        
(Showing Draft Content)

C1.Win.C1FlexGrid.C1FlexGridBase.PrintGrid

PrintGrid Method

PrintGrid(string, PrintGridFlags)

Prints the grid, optionally showing a page setup or print preview dialog.

Declaration
public bool PrintGrid(string docName, PrintGridFlags flags)
Parameters
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.

Returns
Type Description
bool

True if the grid was printed, false if the user canceled the operation before printing started.

Remarks

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.

PrintGrid(string, PrintGridFlags, string, string)

Prints the grid, optionally showing a page setup or print preview dialog.

Declaration
public bool PrintGrid(string docName, PrintGridFlags flags, string header, string footer)
Parameters
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.

Returns
Type Description
bool

True if the grid was printed, false if the user canceled the operation.

Remarks

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.

PrintGrid(string)

Prints the grid, optionally showing a page setup or print preview dialog.

Declaration
public bool PrintGrid(string docName)
Parameters
Type Name Description
string docName

The document name, which appears on the progress dialogs and on the print job windows.

Returns
Type Description
bool

True if the grid was printed, false if the user canceled the operation.

Remarks

Use the PrintParameters property to set up options such as page orientation and margins, header and footer fonts, etc.