Version

Setting or Obtaining Active Selection’s Formatting (UltraSpreadsheet)

Purpose

This topic explains how to set or obtain active selection’s formatting.

Required background

The following table lists the concept and topics required as a prerequisite to understanding this topic.

Type Content

Concept

Infragistics Excel Engine

Topic Purpose

In this section you will find information that will help you to better understand the object model and the functionalities of the Infragistics Excel Engine .

This topic explains in details the features of the UltraSpreadsheet control from developer perspective.

This topic provides an overview of the visual elements of the UltraSpreadsheet control.

Introduction

Feature summary

The UltraSpreadsheet control provides a special property named ActiveSelectionCellRangeFormat of type SpreadsheetCellRangeFormat which can be used to set or obtain different formatting aspects of the active selection, like font properties, alignments, indentation and more.

You can bind some of the properties of this object to different UI elements (like toggle buttons or text boxes) and they will reflect or manipulate the formatting of the active selection’s content.

Note
Note

All changes made to the formatting object will also affect all selected worksheets by the user.

Code Example: Setting the Formatting Object’s Bold Property at runtime.

Description

The following example demonstrates setting the formatting object’s Bold property of the control’s active selection text’s bold state.

Code

Set Bold property:

In C#:

ultraSpreadsheet1.ActiveSelectionCellRangeFormat.Font.Bold = ExcelDefaultableBoolean.True;

In VB#:

ultraSpreadsheet1.ActiveSelectionCellRangeFormat.Font.Bold = ExcelDefaultableBoolean.True

Related Content

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains the activation feature from developer perspective.

This topic explains the selection feature from developer perspective.