This is how it looks with our new Windows8 theme applied. Needless to say, it supports all Themes in the pack of themes for RadControls, in order to make it easier for you to integrate it in any RadControls Application.
RadSpreadsheet is a control that allows editing tabular data utilizing a variety of cell formatting options, styles and themes. It can contain one or more Worksheets, each of which with its own Scale Factor and Undo/Redo stack. Handy, huh?
Every worksheet contains cells that are identified by a row number (rows are represented by numbers - 1, 2, 3) and a column number (columns are represented by letters of the alphabet in the UI).
You can input numbers, text or formulas in a cell. You can format numbers in one of the following categories:
This is very helpful when you want to represent for example Financial Data - keeping track of investments, creating budgets, etc. The date formats will facilitate you to represent different periods of time and accounting formats will let you specify amounts in various currencies effortlessly.
Formulas are built-in functions that you can use by prepending the equals sign (=) to the string you input in a cell and then inputting the name of a function. There are functions that accept different number of parameters such as “SUM(argument1, argument2, …)”, as well as ones that do not require you to input any parameters, like “DATE()” . You can perform miscellaneous calculations on the values of any range of cells and display the result as a Formula in a selected cell. This is very convenient when you want RadSpreadsheet to calculate the sum of all cells in a column and show it as “Total”.
Other cool features are the Auto fill and the Series which fill cells automatically with data following a specific pattern. They provide a wide variety of options for lazy people such as developers to populate cells with the same content or functional series like:
You can modify many more different properties of the cells and the worksheet to make them look according to your liking. Here are some of the things you can do with our new control:
Here is how the spreadsheet looks with some cell values and formatting applied as well as different fonts, backgrounds and styles set.
Here is the simplest possible XAML definition of RadSpreadsheet:
<
telerik:RadSpreadsheet
x:Name
=
"radSpreadsheet"
/>
Now maybe you are wondering how to get to a cell’s properties and possibly change some of them. Well, let’s see:
Actions connected with formatting are performed over a CellSelection. Here is the code which retrieves a cell selection that includes the cell that resides in row 0, column 1:
CellSelection cell =
this
.radSpreadsheet.Workbook.ActiveWorksheet.Cells[0, 1];
After that, getting its properties is pretty straight forward:
ICellValue value = cell.GetValue().Value;
CellValueFormat format = cell.GetFormat().Value;
bool
isBold = cell.GetIsBold().Value;
If you want to change those, you can do it as follows:
cell.SetValue(
"123"
);
cell.SetFormat(
new
CellValueFormat(
"#,##0.00"
));
cell.SetIsBold(
true
);
We support three formats which you can use to persist your data in. Here they are:
NOTE:
Both CSV and TXT are plain text formats. Thus, the distribution of the document content in cells will be kept, but
the formatting will be lost.
RadSpreadsheet is available with our Q1 2013 release. You can check the Silverlight demo of the control and the click-once Telerik WPF examples. We hope you like it!
In any case, don’t forget that it is only a community technical preview and there is much more to come in the future months, so stay tuned in Telerik forums and blogs. Releasing the component at a CTP state means that we now, more than ever, need your feedback to evaluate what features to implement to better meet yours and your customers’ needs.
Last but not least, RadSpreadsheet is not the only new supplement to the RadControls suite for this release. You can check out the other exciting additions here.