• Getting Started
  • Components
    • Barcodes
    • Buttonsupdated
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogsupdated
    • Drawing
    • Dropdownsupdated
    • Editorupdated
    • Excel Export
    • File Saver
    • Filter
    • Ganttupdated
    • Gauges
    • Gridupdated
    • Iconsupdated
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBoxupdated
    • ListView
    • Mapbeta
    • Menusupdated
    • Navigationupdated
    • Notification
    • Pagerupdated
    • PDF Export
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollViewupdated
    • Sortableupdated
    • ToolBarupdated
    • Tooltipsupdated
    • TreeList
    • TreeView
    • Typography
    • Uploadsupdated
    • Utilitiesupdated
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs
New to Kendo UI for Angular? Start a free 30-day trial

ColumnComponent

Represents the columns of the Angular Data Grid.


@Component({
   selector: 'my-app',
   template: `
       <kendo-grid [data]="gridData">
         <kendo-grid-column field="ProductID" title="Product ID" [width]="120">
         </kendo-grid-column>
         <kendo-grid-column field="ProductName" title="Product Name">
         </kendo-grid-column>
         <kendo-grid-column field="UnitPrice" title="Unit Price" [width]="230">
         </kendo-grid-column>
         <kendo-grid-column field="Discontinued" [width]="120">
             <ng-template kendoGridCellTemplate let-dataItem>
                 <input type="checkbox" [checked]="dataItem.Discontinued" disabled/>
             </ng-template>
         </kendo-grid-column>
       </kendo-grid>
   `
})

class AppComponent {
   public gridData: any[];

   constructor() {
       this.gridData = products;
   }
}

const products = [{
   "ProductID": 1,
   "ProductName": "Chai",
   "UnitPrice": 18.0000,
   "Discontinued": true
 }, {
   "ProductID": 2,
   "ProductName": "Chang",
   "UnitPrice": 19.0000,
   "Discontinued": false
 }
];

Selector

kendo-grid-column

Inputs

NameTypeDefaultDescription

autoSize

boolean

Indicates whether the column will be resized during initialization so that it fits its header and row content.

columnMenu

boolean

true

Specifies if the column menu will be shown for the column.

class

string | string[] | Set<string> | {[key: string]: any}

Sets the custom CSS classes to the column cells. Under the hood, to apply the property, the class option uses the NgClass directive. See example. To customize header and footer column cells, use the headerClass and footerClass inputs.

editable

boolean

Defines whether the column is editable. The default value is true.

<kendo-grid>
   <kendo-grid-column field="UnitPrice" [editable]="false">
   </kendo-grid-column>
</kendo-grid>

editor

"boolean" | "text" | "numeric" | "date"

Defines the editor type (see example). Used when the column enters the edit mode. The default value is text.

<kendo-grid>
   <kendo-grid-column field="UnitPrice" editor="numeric">
   </kendo-grid-column>
</kendo-grid>

field

string

The field to which the column is bound.

filter

"boolean" | "text" | "numeric" | "date"

Defines the filter type that is displayed inside the filter row. The default value is text.

<kendo-grid>
   <kendo-grid-column field="UnitPrice" filter="numeric">
   </kendo-grid-column>
</kendo-grid>

filterable

boolean

Defines if a filter UI will be displayed for this column. The default value is true.

<kendo-grid>
   <kendo-grid-column field="UnitPrice" [filterable]="false">
   </kendo-grid-column>
</kendo-grid>

filterClass

string | string[] | Set<string> | {[key: string]: any}

Sets the custom CSS classes to the filter row cell. Under the hood, to apply the property, the filterClass option uses the NgClass directive. See example.

filterStyle

{[key: string]: string}

Sets the custom styles for the filter row cell. Under the hood, to apply the property, the filterStyle option uses the NgStyle directive. See example.

footerClass

string | string[] | Set<string> | {[key: string]: any}

Sets the custom CSS classes to the column footer cell. Under the hood, to apply the property, the footerClass option uses the NgClass directive. See example.

footerStyle

{[key: string]: string}

Sets the custom styles for the footer cell of the column. Under the hood, to apply the property, the footerStyle option uses the NgStyle directive. See example.

format

any

The format that is applied to the value before it is displayed. Takes the {0:format} form where format is a standard number format, a custom number format, a standard date format, a custom date format or a format object. For more information on the supported date and number formats, refer to the kendo-intl documentation.

Standard format:

<kendo-grid>
   <kendo-grid-column field="UnitPrice" format="{0:c}">
   </kendo-grid-column>
</kendo-grid>

Format object for currency:

<kendo-grid>
   <kendo-grid-column field="UnitPrice" [format]="{ style: 'currency', currency: 'EUR' }">
   </kendo-grid-column>
</kendo-grid>

Format object for dates:

<kendo-grid>
   <kendo-grid-column field="FirstOrderedOn" [format]="{ date: 'short' }">
   </kendo-grid-column>
</kendo-grid>

groupable

boolean

Determines if the column can be dragged to the group panel. The default value is true. If set to false, you can group the columns by the column field by using the API of the Grid.

headerClass

string | string[] | Set<string> | {[key: string]: any}

Sets the custom CSS classes to the column header cell. Under the hood, to apply the property, the headerClass option uses the NgClass directive. See example.

headerStyle

{[key: string]: string}

Sets the custom styles for the header cell of the column. Under the hood, to apply the property, the headerStyle option uses the NgStyle directive. See example.

hidden

boolean

false

Sets the visibility of the column (see example).

includeInChooser

boolean

true

Specifies if the column will be included in the column-chooser list.

lockable

boolean

true

Specifies if the column can be locked or unlocked from the column menu or by reordering the columns.

locked

boolean

false

Toggles the locked (frozen) state of the columns (more information and example).

maxResizableWidth

number

The width (in pixels) above which the user is not able to resize the column by using the UI (see example). By default, the maximum width is not restricted.

media

string

Sets the condition that needs to be satisfied for a column to remain visible (see example). If you set the hidden property, the behavior of media is overridden.

Accepts the device identifiers that are available in Bootstrap 4 (see example):

minResizableWidth

number

10

The width (in pixels) below which the user is not able to resize the column by using the UI (see example).

reorderable

boolean

true

Indicates whether the column is reorderable.

resizable

boolean

true

Indicates whether the column is resizable.

sortable

boolean | ColumnSortSettings

Allows the column headers to be clicked and the sortChange event emitted. You have to handle the sortChange event yourself and sort the data.

stickable

boolean

true

Specifies if the column can be stuck or unstuck from the column menu.

sticky

boolean

false

Determines whether the column will be always visible when scrolling the Grid horizontally.

style

{[key: string]: string}

Sets the custom styles for the table cells (excluding the footer and header ones) of the column. Under the hood, to apply the property, the style option uses the NgStyle directive. See example.

title

string

The title of the column.

width

number

The width of the column (in pixels).

Fields

NameTypeDefaultDescription

orderIndex

number

0

The column index after reordering. The orderIndex is a read-only property. Setting this field does not affect column order.

In this article

Not finding the help you need?