dynamic display the room list by NGUI

I want to display the room list where the rooms information are get from the server,
for each room, display it one by one as a button on the panel,
i have make an prefab for my room button and i would like to know
how can i get the panel location and instantiate the button on the panel ?
i want the first room putting on the left hand corner like this

The easiest way I’ve found to position stuff like this within an NGUI panel is to have a UITable or UIGrid component as a child of the panel. Both components will allow you to position a number of child elements in a consistent way.

Once you have the grid or table, from code you can instantiate button prefabs as children of the grid or table. The easiest way to do this in code is to use the NGUITools.AddChild function, which will instantiate a given prefab as the child of a given parent.

Then, once you’ve instantiated the buttons for the UI panel, you can call UITable.Reposition (or the equivalent for UIGrid), which will take all the children of the Table and reposition them so that they are equally spaced according to the inspector values you have set.