I have an angular application which has a lot of components using DxDataGrid, all of them have the same default options. Is it possible to set the default options somewhere at any settings file or something similar?
Use the dxDataGrid.defaultOptions method to set default configuration options for all DataGrid widgets. This method is static and you can call it in a constructor of the main component.
export class AppModule {
constructor() {
DataGrid.defaultOptions({
options: {
showRowLines: true,
showColumnLines: false,
rowAlternationEnabled: false,
focusedRowEnabled: true,
allowColumnResizing: true,
noDataText: "",
scrolling: {
mode: "virtual"
},
sorting: {
mode: "single"
},
loadPanel: {
enabled: false
}
}
});
}
}
Answered in this question from DevExtreme support