Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Javadoc example Javascript instead of Java / Enhancement suggestion / Hilite question

$
0
0
Hi Isomorphic,

please see ListGrid.canEditCell(). The example should be:
Code:

@Override
public boolean canEditCell(int rowNum, int colNum) {
        Record record = this.getRecord(rowNum);
        String fieldName = this.getFieldName(colNum);
        if (fieldName.equals("shipDate") && record.getAttribute("orderStatus").equals("complete") {
                return false;
        }
        // use default rules for all other fields
        return super.canEditCell(rowNum, colNum);
};

Also, the docs have some entries of "${isc." which were not replaced by links. I found those searching the docs in the browser after noticing the isc in the example.

Enhancement suggestion:
Could you add a .ds.xml field-level attribute canEditField (must be boolean), which decides on a per-row basis if the current field is editable in the current row?

This would work like you described it for Hilites:
Quote:

Originally Posted by docs
A hilite can be applied to data either by defining criteria or by explicitly including markers on the data itself.

Please note that I did not find a way to do this "explicitly including markers on the data itself" in the docs.
Out of interest: How is it done? What to call instead of Hilite.setCriteria()?

Thank you & Best regards
Blama

Viewing all articles
Browse latest Browse all 4756

Trending Articles