Announcement

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

    ListGrid.getField() return null

    Hi,

    I have a ListGrid which bind to a RestDataSource. My code is
    Code:
            grid.setDataSource(datasource);
            grid.setUseAllDataSourceFields(true);
            grid.setAutoFetchData(true);
    
           ListGridField passwordField = grid.getField("password");
            if (passwordField == null) {
                SC.say("passwordField is NULL");
            } else {
                passwordField.setCellFormatter(new CellFormatter() {
                    public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
               
                            return "*******************";
                   
                        }
                    }   
                });
            }
    The SC.say() will be invoked in above code, meant the
    passwordField is null. Why ?

    Thanks
    KC
Working...
X