Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGrid within Window

$
0
0
I am using SmartGWT 3.1 nightly build 12-22-14 Power Edition

Using Firefox version 34

I am creating a window where I would like to place a ListGrid within that window. The problem I am having is that I designate the Height and Width of the window to be 60% and 80% respectively, and when I do the addItem of the ListGrid which has setHeight100 and setWidth100, I get a tiny 1 pixel ListGrid.

I then tried using addMember, which places it with the header of the Window and that seems to give me a ListGrid of the expected size but, the CloseButton and Maximize button are below it, which is not my intention. Why is it that the addMember gives me a ListGrid sized accordingly with the Window size and the addItem does not?

Please see my code below and any help anyone can offer is greatly appreciated. Thank you!

Code:

Window w = new Window();
w.setWidth("80%");
w.setHeight("60%");
w.setShowMinimizeButton(false);
w.setShowMaximizeButton(true);
w.setShowCloseButton(true);
w.setIsModal(true);
w.setShowModalMask(true);
w.centerInPage();

ListGrid grid = new ListGrid();
grid.setHeight100();
grid.setWidth100();
grid.setDataSource(people);

w.addItem(grid);
w.show();


Viewing all articles
Browse latest Browse all 4756

Trending Articles