ravisangar / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

ListGrid.canEditCell method override doesn't affect widget behaviour #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- What steps will reproduce the problem?
Example code:
    public void onModuleLoad() {
        ListGrid grid = new ListGrid() {
            @Override
            public Boolean canEditCell(int rowNum, int colNum) {
                return rowNum < 5;
            }
        };
        grid.setWidth(600);
        grid.setHeight(400);
        grid.setCanSort(false);
        grid.setCanGroupBy(false);

        ListGridField[] gridFields = new ListGridField[25];
        for (int i = 0; i < gridFields.length; i++) {
            final ListGridField gridField = new ListGridField("d" + i, 50);
            gridField.setCanEdit(true);
            gridFields[i] = gridField;
        }
        grid.setFields(gridFields);

        grid.setDataSource(...);

        grid.setAutoFetchData(true);

        RootPanel.get().add(grid);
    }

- What is the expected output? What do you see instead?
Expected to have editable only 5 first rows, but instead all rows are editable.

- What version of the product are you using? On what operating system?
SmartGWT 1.0b1

Original issue reported on code.google.com by durinda....@gmail.com on 3 Feb 2009 at 7:21

GoogleCodeExporter commented 9 years ago

Original comment by sanjiv.j...@gmail.com on 3 Feb 2009 at 9:06

GoogleCodeExporter commented 9 years ago
The current implementation just returns whether the cell can be edited or not. 
But
what we need is controlling whether the cell can be edited or not.

Original comment by jasonzha...@gmail.com on 26 Mar 2009 at 12:11

GoogleCodeExporter commented 9 years ago
Fixed in SVN.

Original comment by sanjiv.j...@gmail.com on 26 Mar 2009 at 4:30