New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the SpreadsheetSheetRowCell settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class SpreadsheetSheetRowCellBuilder

Inheritance: objectSpreadsheetSheetRowCellBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public SpreadsheetSheetRowCellBuilder(SpreadsheetSheetRowCell settings)
Parameters:settingsSpreadsheetSheetRowCell

Methods

The background color of the cell. Many standard CSS formats are supported. However, the canonical form is #ccff00.

C#
public SpreadsheetSheetRowCellBuilder Background(string value)
Parameters:valuestring

The value that configures the background.

Returns:

SpreadsheetSheetRowCellBuilder

If set to true, sets the cell font to bold.

C#
public SpreadsheetSheetRowCellBuilder Bold(bool value)
Parameters:valuebool

The value that configures the bold.

Returns:

SpreadsheetSheetRowCellBuilder

Configure bottom border.

C#
public SpreadsheetSheetRowCellBuilder BorderBottom(Action<SpreadsheetBorderStyleBuilder> action)
Parameters:actionAction<SpreadsheetBorderStyleBuilder>

The value that configures the border.

Returns:

SpreadsheetSheetRowCellBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheets(sheets =&gt;
{
sheets.Add()
.Name("Food Order")
.Rows(rows =&gt;
{
rows.Add()
.Cells(cells =&gt;
{
cells.Add()
.Value("John Doe")
.BorderBottom(borderBottom =&gt; borderBottom.Color("green"));
});
});
})
)

Configure left border.

C#
public SpreadsheetSheetRowCellBuilder BorderLeft(Action<SpreadsheetBorderStyleBuilder> action)
Parameters:actionAction<SpreadsheetBorderStyleBuilder>

The value that configures the border.

Returns:

SpreadsheetSheetRowCellBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheets(sheets =&gt;
{
sheets.Add()
.Name("Food Order")
.Rows(rows =&gt;
{
rows.Add()
.Cells(cells =&gt;
{
cells.Add()
.Value("John Doe")
.BorderLeft(borderLeft =&gt; borderLeft.Color("green"));
});
});
})
)

Configure right border.

C#
public SpreadsheetSheetRowCellBuilder BorderRight(Action<SpreadsheetBorderStyleBuilder> action)
Parameters:actionAction<SpreadsheetBorderStyleBuilder>

The value that configures the border.

Returns:

SpreadsheetSheetRowCellBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheets(sheets =&gt;
{
sheets.Add()
.Name("Food Order")
.Rows(rows =&gt;
{
rows.Add()
.Cells(cells =&gt;
{
cells.Add()
.Value("John Doe")
.BorderRight(borderRight =&gt; borderRight.Color("green"));
});
});
})
)

Configure top border.

C#
public SpreadsheetSheetRowCellBuilder BorderTop(Action<SpreadsheetBorderStyleBuilder> action)
Parameters:actionAction<SpreadsheetBorderStyleBuilder>

The value that configures the border.

Returns:

SpreadsheetSheetRowCellBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheets(sheets =&gt;
{
sheets.Add()
.Name("Food Order")
.Rows(rows =&gt;
{
rows.Add()
.Cells(cells =&gt;
{
cells.Add()
.Value("John Doe")
.BorderTop(borderTop =&gt; borderTop.Color("green"));
});
});
})
)

The font color of the cell. Many standard CSS formats are supported. However, the canonical form is #ccff00.

C#
public SpreadsheetSheetRowCellBuilder Color(string value)
Parameters:valuestring

The value that configures the color.

Returns:

SpreadsheetSheetRowCellBuilder

The comment of the cell - a tooltip that appears when the cell is hovered.

C#
public SpreadsheetSheetRowCellBuilder Comment(string value)
Parameters:valuestring

The value that configures the comment.

Returns:

SpreadsheetSheetRowCellBuilder

If set to false, disables the cell.

C#
public SpreadsheetSheetRowCellBuilder Enable(bool value)
Parameters:valuebool

The value that configures the enable.

Returns:

SpreadsheetSheetRowCellBuilder

The font family of the cell.

C#
public SpreadsheetSheetRowCellBuilder FontFamily(string value)
Parameters:valuestring

The value that configures the fontfamily.

Returns:

SpreadsheetSheetRowCellBuilder

The font size of the cell in pixels.

C#
public SpreadsheetSheetRowCellBuilder FontSize(double value)
Parameters:valuedouble

The value that configures the fontsize.

Returns:

SpreadsheetSheetRowCellBuilder

The format of the cell text. For more information, refer to the article on creating or deleting a custom number format on MS Office.

C#
public SpreadsheetSheetRowCellBuilder Format(string value)
Parameters:valuestring

The value that configures the format.

Returns:

SpreadsheetSheetRowCellBuilder

The cell formula without the leading equals sign, for example, A1 * 10.

C#
public SpreadsheetSheetRowCellBuilder Formula(string value)
Parameters:valuestring

The value that configures the formula.

Returns:

SpreadsheetSheetRowCellBuilder

If set to true, renders the cell value as HTML. It is important to sanitize the value of the cell on the server for passing safe html because there is no client-side sanitizing. When editing a cell the new value can be checked and prevented in the client changing event.

C#
public SpreadsheetSheetRowCellBuilder Html(bool value)
Parameters:valuebool

The value that configures the html.

Returns:

SpreadsheetSheetRowCellBuilder

The zero-based index of the cell. Required to ensure correct positioning.

C#
public SpreadsheetSheetRowCellBuilder Index(int value)
Parameters:valueint

The value that configures the index.

Returns:

SpreadsheetSheetRowCellBuilder

If set to true, sets the cell font to italic.

C#
public SpreadsheetSheetRowCellBuilder Italic(bool value)
Parameters:valuebool

The value that configures the italic.

Returns:

SpreadsheetSheetRowCellBuilder

The hyperlink (URL) of the cell.

C#
public SpreadsheetSheetRowCellBuilder Link(string value)
Parameters:valuestring

The value that configures the link.

Returns:

SpreadsheetSheetRowCellBuilder

Specifies the text alignment in the cell

C#
public SpreadsheetSheetRowCellBuilder TextAlign(SpreadsheetTextAlign value)
Parameters:valueSpreadsheetTextAlign

The value that configures the textalign.

Returns:

SpreadsheetSheetRowCellBuilder

If set to true, sets the cell font to underline.

C#
public SpreadsheetSheetRowCellBuilder Underline(bool value)
Parameters:valuebool

The value that configures the underline.

Returns:

SpreadsheetSheetRowCellBuilder

The validation rule that is applied to the cell.

C#
public SpreadsheetSheetRowCellBuilder Validation(Action<SpreadsheetSheetRowCellValidationSettingsBuilder> configurator)
Parameters:configuratorAction<SpreadsheetSheetRowCellValidationSettingsBuilder>

The action that configures the validation.

Returns:

SpreadsheetSheetRowCellBuilder

Example:
C#
@( Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheets(sheets =&gt;
{
sheets.Add()
.Name("Food Order")
.Rows(rows =&gt;
{
rows.Add()
.Cells(cells =&gt;
{
cells.Add()
.Value("John Doe")
.Validation(validation =&gt; validation
.DataType("custom")
.From("AND(LEN(A3)&gt;3, LEN(A3)&lt;200)")
.AllowNulls(true)
.Type("reject")
.TitleTemplate("Full Name validation error")
.MessageTemplate("The full name should be longer than 3 letters and shorter than 200."));
});
});
})
)

Configures the value for the cell

C#
public SpreadsheetSheetRowCellBuilder Value(object value)
Parameters:valueobject

The cell value.

Returns:

SpreadsheetSheetRowCellBuilder

Specifies the text vertical alignment in the cell

C#
public SpreadsheetSheetRowCellBuilder VerticalAlign(SpreadsheetVerticalAlign value)
Parameters:valueSpreadsheetVerticalAlign

The value that configures the verticalalign.

Returns:

SpreadsheetSheetRowCellBuilder

If set to true, wraps the cell content.

C#
public SpreadsheetSheetRowCellBuilder Wrap(bool value)
Parameters:valuebool

The value that configures the wrap.

Returns:

SpreadsheetSheetRowCellBuilder