Hi, I think that I found a bug.
I can reproduce it there:
https://dojo.telerik.com/@foxontherock/EvuWidey
In my app, I need to use "setOptions" sometimes, because I need to change my "columns" collection depending on the data I display.
If I send non-empty data in my setOptions parameter, it looks like they are kept somewhere, they're back later when I try to sort an empty grid.
Steps to reproduct:
1. Initialise with empty data + columns, sortable.
2. Change the dataset, using the kgrid.setOptions(dataSource: {data: [non empty array]})
3. Now, empty the grid with kgrid.dataSource.data([])
4.Click any header to sort the grid.
Surprise! the original data from step 2 is back!
You can try it easily in my "dojo" sample.
https://dojo.telerik.com/@foxontherock/EvuWidey
For now, what I did is to always use setOptions with empty data, then applying my data after, and it solve my problem.
But, I take time to mention it to you because I think it's a bug that can happen to someone else.
Thank you