Thank you Nikolay for the response.
That really could be a possible solution.
But I''ve managed to find a solution by moving all the Grid properties from InitializeDataSource to InitializeLayout and also by inserting the below condition in the InitializeLayoutHandler.
If Not SampleGrid.IsXmlHttpRequest Then
SampleGrid.DisplayLayout.Pager.Reset()
End If