Hide a Column Using the API
A column is considered hidden when its visible option is false. You can change this option programmatically using the columnOption(id, optionName, optionValue) method. For example, the following code hides an "Email" column:
jQuery
JavaScript
$("#dataGridContainer").dxDataGrid("columnOption", "Email", "visible", false);
Angular
TypeScript
import { ..., ViewChild } from '@angular/core'; import { DxDataGridModule, DxDataGridComponent } from 'devextreme-angular'; // ... export class AppComponent { @ViewChild(DxDataGridComponent) dataGrid: DxDataGridComponent; hideEmails() () { this.dataGrid.instance.columnOption("Email", "visible", false); } } @NgModule({ imports: [ // ... DxDataGridModule ], // ... })
See Also
Feel free to share demo-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you!
We appreciate your feedback.
We appreciate your feedback.