Announcement

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

    Expanding rows based on cell click in a list grid

    Expanding rows based on cell click in a list grid - Currently i dont this feature in smart client. Where i can click a cell for interest in a list grid, Which would expand its details just beneath it in a row. So that each cell would have its description displayed beneath it in a row.

    I saw row expand in list grid, for smart client version 8 beta release.

    Please guys guide me on this.

    #2
    Please check the below code.

    Grid with two buttons



    final ListGrid egsListGrid = new ListGrid() {
    protected Canvas getExpansionComponent(
    final ListGridRecord record) {
    final ListGrid grid = this;
    VLayout layout = new VLayout(5);
    layout.setPadding(5);

    final DynamicForm df = new DynamicForm();
    df.setNumCols(2);
    df.setWidth(600);
    df.setDataSource(odsdataSource);
    df.focus();
    df.addDrawHandler(new DrawHandler() {
    public void onDraw(DrawEvent event) {
    //grid.startEditing();
    df.editRecord(record);
    }
    });

    IButton saveButton = new IButton("Save");
    saveButton.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
    df.saveData();
    }
    });

    IButton doneButton = new IButton("Done");
    doneButton.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
    //Window.alert("Doneeeeeeeeeeeeeee ");
    grid.collapseRecord(record);
    }
    });
    HLayout hLayout = new HLayout(10);
    hLayout.setAlign(Alignment.RIGHT);
    hLayout.addMember(saveButton);
    hLayout.addMember(doneButton);

    layout.addMember(df);
    layout.addMember(hLayout);
    return layout;
    }
    };
    Last edited by chinjurani; 22 Jun 2010, 01:08.

    Comment

    Working...
    X