Hello Syncfusion team,
I was wondering, if I can trigger events manually (without actually doing the triggering action).
In Javascript e.g. there is a possibility to say window.dispatchEvent(new Event("resize")); and the window resize event is triggered without actually resizing the window.
In my case, it would be helpful to trigger a column resize event in my grids because the column widths are not loaded correctly, so there are discrepancies between the header and the data rows (example below). If I resize one of the columns, all the columns directly adapt their actual width, so I would like to trigger that everytime the grid has loaded itself.
Thanks in regard,
Jonas Czeslik
I guess, it is not possible to share a simple sample of that problem because I cannot replicate it in an "only-syncfusion-sphere" . So my guess is that it has to do with some other features like a golden layout container and its offsets, width and height observers, custom stylings or something like that, but that would carry things too far.
It would have been an easy solution to say something like this.gridObj.triggerResizeEvent(), but if thats not possible, I have to search for the error in the mentioned areas individually.
Thanks for the help!
Jonas C.
Hello,
I am facing the same problem with offset (and also would like to have this trigger on column resize).
By any chance, is there a solution found by You, Jonas?
Hi RolJan,
Thanks for contacting Syncfusion support.
Kindly share the below details to proceed further with your query.
Regards,
Rajapandiyan S
Dear Rajapandiyan,
I've found a solution for column misalignment - it was caused by default padding-right of e-gridheader.
Changed it to
0
!importntant
Was enough to solve the problem.
For resizing problem: solution was to use:
resizeSettings = { mode: 'Auto' };
For grid configuration (always resize to the max width)
Hi RolJan,
We are happy to hear that you have found the solution to your issue.
Please get back to us if you need further assistance on this.