There is a class called DataGrid, which you can use as a type to send in you method as a parameter and also you can return the same. I'm not much familiar with the VB but anyhow I have given example method in C#, which would obviously can help u to implement the same in VB.
public DataGrid SomeMethod(DataGrid dg)
DataGrid grid = new DataGrid();
grid.AllowPaging = true;