Hi,
Recently I have tried to use Syncfusion components to build a demo. I encountered an issue that the column chooser dropdown list in the toolbar does not show, while the column chooser in the column menu can work well. I was wondering if you could investigate the demo to see if it is an issue with the components or something else wrong.
As for the header text in the header row, I used to try to set a column's header text in dataBound event but it does not reflect in the header row (i.e., it still shows the field). Still, similarly, the column menu can render the correct header text rather than the field.
I use the auto-generation feature of columns due to the data structure.
P.S.
- Procedures to run the sample
You could navigate to the debug section of VS Code and launch in the predefined mode called "electron: debug" or "electron: dev" on Windows/macOS after installing all dependencies. As an alternative, you could also use the command `npm run electron:serve` under the root directory. Please note that the app is a demo for evaluating the feasibility of developing a Windows/macOS desktop app using Vue 3 and Electron. Hence, the app is not expected to be launched and work well via the browser. Instead, a desktop app should be error-free and launched with the dev mode which means you could invoke the browser developer tools using the keys Ctrl+Shift/option+I.
To navigate to the view containing the data grid, type "SZ000021" in the first textbox and select a recent date (one day recommended). After submitting the form, waiting for the search results.
Attachment: Kobe_bc0a93e0.zip
|
import { ColumnMenu, Filter, Freeze, Resize, Sort, Toolbar, ColumnChooser } from "@syncfusion/ej2-vue-grids";
export default {
provide: { grid: [ColumnMenu, Filter, Freeze, Resize, Sort, Toolbar, ColumnChooser] },
} |
|
// Grid’s dataBound event handler
adjustGrid() {
for (var searchResultGridColumn of this.$refs[this.searchResultGridName].ej2Instances.columns) {
searchResultGridColumn.minWidth = 50;
searchResultGridColumn.type = "number";
searchResultGridColumn.headerText = "...";
} // end for
this.$refs[this.searchResultGridName].refreshColumns();
}, // end method adjustGrid |