---
title: TableCellSelector
framework: applenewsformat
role: symbol
role_heading: Object
path: applenewsformat/tablecellselector
---

# TableCellSelector

The object for defining conditions that apply a conditional style to a cell.

## Declaration

```data
object TableCellSelector
```

## Properties

columnIndex: Specifies a column index. The leftmost column of data has an index of 0. descriptor: Specifies the identifier of a specific data descriptor. All cells for this data descriptor will be selected. See DataDescriptor. evenColumns: When true, selects the cells in even columns. evenRows: When true, selects the cells in even rows. oddColumns: When true, selects the cells in odd columns. oddRows: When true, selects the cells in odd rows. rowIndex: Specifies a row index. The topmost row of data has an index of 0.

## Discussion

Discussion Use the TableCellSelector object to set the criteria for applying conditional styles to rows. For example, you could set criteria to select a cell at a specific location or to select cells for a certain data descriptor. You can use this object in  ConditionalTableCellStyle. Example {   "components": [     {       "role": "datatable",       "style": "bookTableStyle",       "showDescriptorLabels": true,       "sortBy": [         {           "descriptor": "id-publication-date",           "direction": "ascending"         }       ],       "data": {         "descriptors": [           {             "identifier": "id-publication-date",             "key": "publicationDate",             "label": "Date",             "dataType": "string"           },           {             "identifier": "id-title",             "key": "title",             "label": "Title",             "dataType": "string"           },           {             "identifier": "id-publisher",             "key": "publisher",             "label": "Publisher",             "dataType": "string"           }         ],         "records": [           {             "title": "Mardi",             "publicationDate": "1849",             "publisher": "Harper & Brothers"           },           {             "title": "Typee",             "publicationDate": "1846",             "publisher": "Wiley and Putnam"           },           {             "title": "White-Jacket",             "publicationDate": "1850",             "publisher": "Harper & Brothers"           },           {             "title": "Omoo",             "publicationDate": "1847",             "publisher": "Harper & Brothers"           },           {             "title": "Redburn",             "publicationDate": "1849",             "publisher": "Harper & Brothers"           },           {             "title": "Moby-Dick",             "publicationDate": "1851",             "publisher": "Harper & Brothers"           }         ]       }     }   ],   "componentStyles": {     "bookTableStyle": {       "tableStyle": {         "headerCells": {           "padding": 5,           "textStyle": {             "fontWeight": "bold",             "fontStyle": "normal"           }         },         "cells": {           "padding": 2,           "conditional": [             {               "selectors": [                 {                   "oddRows": true                 }               ],               "backgroundColor": "#eeeeee"             }           ]         }       }     }   } }

## See Also

### Table Styles

- [Defining and Using Table Styles](applenews/defining-and-using-table-styles.md)
- [TableStyle](applenewsformat/tablestyle.md)
- [TableRowStyle](applenewsformat/tablerowstyle.md)
- [ConditionalTableRowStyle](applenewsformat/conditionaltablerowstyle.md)
- [TableRowSelector](applenewsformat/tablerowselector.md)
- [TableColumnStyle](applenewsformat/tablecolumnstyle.md)
- [ConditionalTableColumnStyle](applenewsformat/conditionaltablecolumnstyle.md)
- [TableColumnSelector](applenewsformat/tablecolumnselector.md)
- [TableCellStyle](applenewsformat/tablecellstyle.md)
- [ConditionalTableCellStyle](applenewsformat/conditionaltablecellstyle.md)
- [TableBorder](applenewsformat/tableborder.md)
- [TableStrokeStyle](applenewsformat/tablestrokestyle.md)
- [Padding](applenewsformat/padding.md)
- [FormattedText](applenewsformat/formattedtext.md)
