Announcement

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

    Auto-check select box in Listgrid

    I have a listgrid that fills correctly, and the first column (ListGridField) is a boolean. It is either selected or not. When I add a new row, I want the first column to be automatically checked.

    Any quick way to do that?

    Code:
    addNewDataButton.addClickHandler(new ClickHandler() {
    			public void onClick(ClickEvent event ) {
    				testSetField.setCanEdit(true);
    				testNameField.setCanEdit(true);
    				testGrid.startEditingNew(); 
    				ListGridRecord record = testGrid.getSelectedRecord();
    				record.setAttribute("selectedField", true);
    			}
    		});
    Thanks!

    #2
    Use the signature of startEditingNew() that takes a Map - these are initial values for the record.

    Comment

    Working...
    X