Posted 11 September 2019, 7:16 pm EST
I want to do some other task when user double click on the FlexGrid but I can’t find any event related to that.
Forums Home / Wijmo / General Discussion
Posted by: adminbursatec on 11 September 2019, 7:16 pm EST
Posted 11 September 2019, 7:16 pm EST
I want to do some other task when user double click on the FlexGrid but I can’t find any event related to that.
Posted 11 September 2019, 11:56 pm EST
Hi,
Since the FlexGrid is contained inside an HTML element, you may simply add an event handler using the addEventListener method on the hostElement of the FlexGrid. Please refer to the code snippet below:
// grid -> instance of FlexGrid
grid.hostElement.addEventListener('dblclick', function(e) {
console.log('Double Click');
})
Regards,
Ashwin
Posted 8 May 2020, 2:21 pm EST
Thanks for your answer; that actually works
I have another question. I’m using the grid fro Vue components. In those grids where i have a check (true/false values) all the columns have centered alignment and I don’t want that. I want to each column respect the alignment depending on de dataType ¿how can I achieve that?
Posted 11 May 2020, 2:33 am EST
Hi,
The Boolean dataType will make the columns center-aligned by default. But, you can change the alignment by setting the align property:
<wj-flex-grid-column :align="'left'"></wj-flex-grid-column>
~regards