This question may seem similar to others regarding alignment, but it specifically pertains to alignment when new data is set in the datasource. I'm unsure if I have the grid setup correctly or if there's a better workaround available.
Upon resizing the Kendo data grid, the columns and header appear aligned (with some issues in Chrome). However, once I resize a column and search for new data, I notice that the columns and headers are misaligned.
I have tried using both Firefox and Chrome, and encountered the same issue on both browsers.
While this problem shares similarities with other alignment issues, those focus on resizing rather than loading new data.
Kendo Grid header and data row columns are not aligned
Bug in kendo ui grid lrt css in chrome
Here is an example of the issue I'm experiencing.
http://jsfiddle.net/teisaacs21w/6k5km7nb/
- resize a column and hit search
- notice the grid and columns headers are misaligned
I have tried setting up the grid in various ways, but still encounter this issue. In the provided fiddle, data needs to be searched first before being loaded. I have also tried pre-loading the datasource by defining transport in the options object.
Thus far, I haven't found a way to prevent this issue from occurring.
After examining the HTML, I noticed that when new data is loaded, the header loses the styling applied by Kenodo upon column resize.
I devised a workaround which seems to work well in the fiddle, but sometimes the headers behave erratically in my application when adopting this approach.
`workaround`
http://jsfiddle.net/teisaacs21w/a7cfv4g6/
I'd appreciate hearing from anyone who has faced a similar issue and can advise whether it's related to my setup or offer a better solution?