In our most recent update (v19.1), we added two major enhancements to our ASP.NET Spreadsheet (the features described herein are available for the WebForms, MVC, Core, and Bootstrap versions of the DevExpress Spreadsheet control).
Client-Side API Enhancements
We've added a new client-side Print
command so you can easily invoke the browser's Print dialog.
<script>
function onPrintButtonClick(s, e) {
spreadsheet.Print("_self");
}
</script>
<dx:ASPxButton runat="server" Text="Print document" AutoPostBack="false" Image-IconID="actions_print_16x16devav">
<ClientSideEvents Click="onPrintButtonClick" />
</dx:ASPxButton>
Note: Send "_self" to the Print
method to display the print dialog on the same page. To display the dialog on a new page, send "_blank" to the method.
If the browser does not support printing, you can export your workbook to PDF. To learn more about client-side printing, please take a look at this blog post.
Culture-Specific Format
The Format Cells dialog allows you to apply culture-specific formatting to date and numeric values.
Сulture-specific formatting is applied to a date or numeric cell values based on the current culture (locale). Use the following steps to change the default locale for the Date values:
- Select a cell or cell range to format
- Right click on the selection and choose the "Format Cells" menu item
- Click the Date category on the left side of the dialog
- Using the "Locale" combo-box, choose a country or region that uses the required date format
- Select the required date format. The Sample region on the dialog will display a preview of the formatted value
- Click "OK" to apply the changes
You can also change the default locale for Time, Currency and Accounting type values.
Feedback
We want to hear your thoughts. Please tell us what you think of these new capabilities and how you expect to use it in an upcoming project. Are you currently happy with our server-side print implementation? Do you expect to you use this new client-side print option?
Free DevExpress Products - Get Your Copy Today
The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the
DevExpress Support Center at your convenience. We'll be happy to follow-up.