Yesterday I discussed the improved Copy/paste functionality in our Spreadsheet control. In this post, I'll discuss a few other important features we'll introduce for our WinForms and WPF Spreadsheet Control.
Data Validation Support
Use it to prevent invalid data entry into worksheet cells. Here are a few things you'll be able to do with this new feature:
- Create a drop-down list of predefined values
- Restrict numbers outside a specified range
- Restrict dates and times outside a certain time interval
- Limit the number of characters entered into a cell
- Validate data using a comprehensive set of spreadsheet formulas
Data validation settings are located in the Data Tools group of the Data tab.
End-users can apply data validation rules to cells using the Data Validation dialog. The dialog allows them to specify data validation criteria, add a descriptive message to validated cells and create an error alert to be displayed when a user enters invalid data.
To specify data validation in code, use the Worksheet.DataValidations property. This provides access to a collection of DataValidation objects, combining the validated cell range, validation rule type and validation parameters required by a rule. For example, you can use the following code to create a data validation rule that invokes a custom error message when a user enters a number less than 5-digits.
Page Setup
In addition to the commands located in the Page Layout ribbon page group, this release incorporates a new Page Setup dialog. Use this dialog to specify printing settings for a worksheet (set page orientation, paper size, page margins, printout and scaling options, etc).
Headers and Footers
With v15.1, you can now insert headers and footers at the top and bottom of a worksheet printout. To get started, invoke the Page Setup dialog and switch to the Header/Footer tab. Select one of the predefined options in the Header or Footer drop-down list, or click the Custom Header/Footer... button to add your custom header/footer.
The Spreadsheet control also supports header/footer codes so you can insert dynamic information, such as page numbers, current date and time, filename, worksheet name, etc.
To view worksheet headers and footers, invoke the Print Preview window, or export the document to PDF format.
As always, we welcome your comments and feedback. Let us know what you think of these new features.