Posted 10 July 2018, 1:18 am EST
When i click on button which fetches data then i am able to see Column headers, is there any way to show column headers when there is not data loaded for grid.
Forums Home / Wijmo / General Discussion
Posted by: rohaanthakare on 10 July 2018, 1:18 am EST
Posted 10 July 2018, 1:18 am EST
When i click on button which fetches data then i am able to see Column headers, is there any way to show column headers when there is not data loaded for grid.
Posted 11 July 2018, 6:15 am EST
Hi,
You can easily show column headers before loading the data by defining columns property of grid.
Please refer to following code snippet
var grid=new wijmo.grid.FlexGrid('#theGrid',{
autoGenerateColumns:false,/* stop grid from generating extra columns when items source is provided */
columns:[ /* define columns for grid */
{header:"ID",binding:"id"},
{header:"Country",binding:"country"},
{header:"Sales",binding:"sales"}
]
});
/* load data later */
You may also refer to the following sample which implements the same:-
https://stackblitz.com/edit/js-pruh9x?file=index.js
~Manish