[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Tables
   [Expand]Charts and Graphics
   [Expand]Mail Merge
    Find and Replace
   [Collapse]Visual Elements
    [Collapse]Cells and Cell Ranges
      Clipboard Operations
      Cell Formatting
      Conditional Formatting
      Custom Draw
     Rows and Columns
     Name Box
     Pop-Up Menus
   [Expand]Keyboard Shortcuts
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Cells and Cell Ranges

All worksheet data is stored in cells (Worksheet.Cells). All cells have faint borders around them, which are called gridlines. You can display or hide gridlines programmatically using the WorksheetView.ShowGridlines property. To enable end-users to change the visibility of gridlines, add the Show Ribbon page group to the SpreadsheetControl. For an example on how to provide the Ribbon UI for the SpreadsheetControl, see the Getting Started topic.

An individual cell is a box at the intersection of a column and row. Each cell is indicated by a cell reference - the column letter and row number where the column and row intersect. The SpreadsheetControl supports different cell reference styles and types. The cell reference is displayed in the Name Box, usually located at the top-left corner of a worksheet. Besides the cell address, the control also displays Defined Names, specified in a worksheet. End-users can use the Name Box to navigate to different cells in a worksheet. To provide end-users with the capability to use the Name Box, add the control directly from the DX.19.1: Spreadsheet Toolbox tab or select the Create FormulaBar item in the SpreadsheetControls Tasks menu to automatically add the Name Box control above the spreadsheet work area. For an example on how to create the Name Box for the SpreadsheetControl, refer to the Getting Started topic.

Expanded Cell Coordinates

The SpreadsheetControl.GetCellBounds method allows you to obtain a cell's x- and y-coordinates relative to the SpreadsheetControl's top-left corner, and the cell's width and height

Expanded Selection

The current cell that is selected and used to enter data is called the active cell. The active cell is identified by a blue border around the cell. To specify the active cell in code, use the SpreadsheetControl.ActiveCell, SpreadsheetControl.SelectedCell or Worksheet.SelectedCell property. When a cell range (Worksheet.Range) is selected, the active cell is usually the top left cell of the selected range. However, end-users can specify the position of the active cell by pressing TAB, SHIFT+TAB, ENTER or SHIFT+ENTER (for more information about supported shortcuts, refer to the Work with Selections document). To get or set the selected cell range, use the SpreadsheetControl.Selection or Worksheet.Selection property. To select multiple non-adjacent cells or cell ranges, use the SpreadsheetControl.SetSelectedRanges or Worksheet.SetSelectedRanges method. To obtain a list of selected cell ranges, use the SpreadsheetControl.GetSelectedRanges or Worksheet.GetSelectedRanges method.

You can also prevent end-users from selecting multiple cell ranges in a worksheet by setting the SpreadsheetSelectionOptions.AllowMultiSelection property to false. Note that this option does not affect multi-selection in code.

Expanded Read More

Is this topic helpful?​​​​​​​