Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    POP-Up ListGrid Uneditable

    Hi,

    So I have a ListGrid that opens as a Pop-up when I click the hyperlink from another listgrid(Misc Field here)
    Click image for larger version  Name:	hyperlink.JPG Views:	1 Size:	13.2 KB ID:	250281
    I've made both the token and value fields editable in the Pop-up grid, however on clicking/double-clicking, these 2 fields are still in uneditable modeClick image for larger version  Name:	pop_up.JPG Views:	1 Size:	13.9 KB ID:	250282
    Below is the source code to generate the Pop-up from the 1st grid

    marketseggrid.addCellClickHandler(new CellClickHandler() {

    @Override
    public void onCellClick(CellClickEvent event) {
    // TODO Auto-generated method stub
    if (event.getColNum() == 3) {
    String mid = event.getRecord().getAttribute("mid");
    mid = "&mid=" + event.getRowNum();
    Window.open(
    "DealManagement.html?screens=marketcontractspopup&tagID=BANC_SMUD01SMT1142_CISO&cacheId=Tag%20Detail%20Options&mode=Admin&timeZone=GMT-05:00"
    + mid,
    "_blank", "width=300,height=200");

    } else if (event.getColNum() == 4) {
    String mid = event.getRecord().getAttribute("mid");
    mid = "&mid=" + event.getRowNum();
    Window.open(
    "DealManagement.html?screens=marketmiscpopup&tagID=BANC_SMUD01SMT1142_CISO&cacheId=Tag%20Detail%20Options&mode=Admin&timeZone=GMT-05:00"
    + mid,
    "_blank", "width=300,height=200");

    }
    }

    });
    }



    And the code for the Pop-Up Grid is as below

    ListGrid miscGrid = new ListGrid();
    miscGrid.setOverflow(Overflow.AUTO);
    miscGrid.setAutoSaveEdits(true);
    miscGrid.setCanEdit(true);
    miscGrid.setSelectionType(SelectionStyle.SINGLE);
    miscGrid.setEditEvent(ListGridEditEvent.CLICK);
    miscGrid.setListEndEditAction(RowEndEditAction.NEXT);
    miscGrid.setSaveLocally(true);
    miscGrid.setShowSortArrow(SortArrow.NONE);
    miscGrid.setShowHeaderMenuButton(false);
    miscGrid.setShowHeaderContextMenu(false);
    miscGrid.setCanSort(false);

    Criteria criteria1 = new Criteria();
    String tagID = settings.get("tagID").get(0);
    criteria1.addCriteria("tagID", tagID);
    String mid = settings.get("mid").get(0);
    criteria1.addCriteria("mid", mid);

    ListGridField token = new ListGridField("token", "Token", 80);
    token.setAlign(Alignment.CENTER);
    token.setCanEdit(true);
    ListGridField value = new ListGridField("value", "Value", 80);
    value.setAlign(Alignment.CENTER);
    value.setCanEdit(true);
    miscGrid.setFields(token, value);

    miscGrid.setDataSource("marmisc");
    miscGrid.fetchData(criteria1);
    addMember(transactionsVLayout);


    Can someone please let me know, what exactly I'm missing here to make the pop-up grid editable? Is it something that I'm missing while providing the url for the Pop-up from the 1st Grid?

    Thanks!




    Last edited by emimayank; 9 Nov 2017, 09:37.

    #2
    We don't see anything obviously wrong that would make your pop-up ListGrid uneditable. We would advise you to try it standalone, but bigger picture, it definitely definitely does not make sense to implement a pop-up like this as a separate browser window (which is what Window.open does). This basically causes initialization of a whole separate application, and will create a lot of complexity trying to communicate back and forth between the two browser windows.

    If you want the pop-up to look like a Window, just use the SmartGWT Window widget.

    Comment

    Working...
    X