1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    dimitre is on a distinguished road

      0  

    Default Unanswered: Grid that fills with contentpanel.

    Unanswered: Grid that fills with contentpanel.


    I am trying to create a grid that fills the width of a ContentPanel when brownser is resizing.
    Any ideas?

    Here is my code:

    GroupingView view = new GroupingView();
    view.setEmptyText("No Data");
    view.setForceFit(true);


    grid = new Grid<CampaignResultListGrid>(store, cm);
    grid.setView(view);


    new QuickTip(grid);
    grid.disableTextSelection(false);
    grid.setColumnLines(true);
    grid.setStripeRows(true);
    grid.ensureDebugId("awrgrid");
    grid.setAutoWidth(true);
    initListener();

    mainContent = GWT.create(ContentPanel.class);
    mainContent.setFrame(true);

    mainContent.layout(true);
    mainContent.setLayout(new FitLayout());
    mainContent.setTopComponent(initFilterPanel());
    mainContent.add(grid);


    mainContent.setHeight(Window.getClientHeight() - 98);
    mainContent.setWidth("100%");
    mainContent.ensureDebugId("panelgrid");
    return mainContent;

    Thanks.

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Location
    China
    Posts
    14
    Answers
    1
    Vote Rating
    0
    shingocat is on a distinguished road

      0  

    Default using viewport

    using viewport


    why not use Viewport to be the top container.

    Viewport viewport = new Viewport();
    ContentPanel cp = new ContentPanel();
    Grid grid = new Grid(store,columnModle);
    cp.add(grid);
    viewport.add(cp)

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    dimitre is on a distinguished road

      0  

    Default


    Thanks, it's working now.

    I have just forgotten to tell you that i am a new be in GXT.

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Answers
    60
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    To add some small hint. In the code snippet are two FitLayouts missing. Both viewport and the contentpanel should have a FitLayout set to make the grid resize correctly.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar