Auto grid resizing problem after filtering data

Auto grid resizing problem
i have the same problem…after I filter data and adjust column the
grid shrinks to the fit only the data row… ie may be 2 rows

once I remove the filter.and clear the grid  i get 10 rows back but the grid does not auto resize to 10 rows . it only displays the size of the 2 rows. once i adjust the column . it then expands to show all 10 rows…
whats the solution for this

Are you using built-in filters or some custom API calls?
In second case, after changing state of grid, add call of the next command

It will update size of grid according to its new content.