Hi Hui,
Sorry for the delay in getting back to you.
The reason is that you are calling the ResizeToFit method in QueryColWidth event. The ResizeToFit will fire QueryRowHeight / QueryColWidth to get the current height / width.
You should call the resizeToFit after the data has changed. So when you change your underlying data, call ResizeToFit at that point. The resize method will automatically receive the new data when the method requests the data from the grid.
Here is a little sample. It is a virtual grid that has button to resize particular pieces of the grid. If you change the text in those pieces and click the button, the cells are resized as needed. There is also a button that bolds the font in those areas of the grid (you have to do this dynamcailly from within QueryCellInfo). If you click the bold button, it will bold the font and resize the cell.
Thanks for your patience.
Regards,
Haneef