• What is KendoReact
  • Getting Started
  • Server Components
  • Components
    • Animation
    • Barcodes
    • Buttons
    • Chartsupdated
    • Common Utilities
    • Conversational UIupdated
    • Data Gridupdated
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Formupdated
    • Ganttupdated
    • Gauges
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Map
    • Notification
    • OrgChartnew
    • PDF Processing
    • PDFViewer
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeViewupdated
    • Upload
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

Styling Basics

The KendoReact Data Grid enables you to style its columns, rows, and cells.


Columns

To style the columns of the Grid, either:

Adding Custom Cells

Adding a custom cell for the Grid columns allows you to change the appearance of that cell based on the provided value. By using the custom-cell approach, you can include icons, buttons, links, or any other HTML elements in the cell.

Example
View Source
Change Theme:

Adding Custom Header Cells

Adding a custom headerCell for the column header of the Grid allows you to change the appearance and to include icons, buttons, links, or any other HTML elements in that header.

Example
View Source
Change Theme:

Adding Class Names

The className property applies additional class to the td element and can be used for styling the background, text color, text alignment, and other styling options of the Grid.

    <GridColumn field="ProductName" title="Product Name" className="product-name">
    product-name {
        color: "white";
        background-color: "#888888"
    }

Rows

To style the rows of the Grid, utilize the rowRender function. rowRender allows you to modify the appearance of the rows based on the provided values.

Example
View Source
Change Theme:

Individual Elements

You can individually style the elements of the Grid by using CSS.

The Grid provides multiple elements that can be individually styled. Before you apply the styling options to the desired elements, inspect the element and use selectors of higher priority.

Filter Icons

The following example demonstrates how to style the appearance of the filter icon in the Grid.

    .k-filtercell-operator > .k-dropdownlist .k-i-filter {
        color:"white"
    }

Sort Icons

The following example demonstrates how to style the appearance of the sort ascending-order icon in the Grid.

    .k-header .k-sort-icon > .k-i-sort-asc-small {
        color:"red"
    }

Page Numbers

The following example demonstrates how to style the appearance of the page numbers in the Grid.

    .k-pager-numbers .k-button {
        color: "black";
    }

Conditional Styling

You can use the custom-cell approach of the Grid to change the appearance of the cells on condition and based on the provided value.

Example
View Source
Change Theme: