Can anybody post some sample code clearly demonstrating how to bind a GridPanel to a DataTable in code behind by autogenerating columns?

In my case, I have a GridPanel in the South region of a BorderLayout (which is within a ViewPort) and and I am trying to bind a datatable to a GridPanel in a server side event. However, it doesn't work. The GridPanel just shows up with a paging toolbar at the bottom but with no records.

I used some sample code from another post in this forum which helped me display the records in the GridPanel. However, this sample code required me to place the GridPanel and its Store in a separate ASPX page which I tried to embed as an IFrame in a popup Window and I ended up having trouble with AutoLoad of the Window control (please see my other posts).

I want to accomplish the following two tasks:

1. Dynamically display datatable rows in the GridPanel in the South region of the BorderLayout in a ViewPort.

2. Pop up a Window control with a GridPanel embedded in it (Merge or IFrame) displaying the rows from a datatable.

Anybody, please help!

Thanks a lot!