SMART datagrid v.1 > Examples

[ grids ver.1.3.6]   Back  Forward

Cursors  Example

If specify ValueColumn.cursor property, you can change the shape of the mouse cursor displayed when the mouse is over the data cell by each column. You can use DataLudi.Cursor constant, or specify the name used in css cursor for the cursor name. 

In the example below, cursor property has been specified in "Country", "Interest Rate", "Project ID" columns. 

Grid - 1
rows

If you would like to dynamically change the cursor according to the value or state of the data cell, you can use DisplayOptions.cursorCallback property. 

Code -1
    grid.setDisplayOptions({
        cursorCallback: function (index) {
            if (index.column.name() == 'InterestRate' && index.getValue() < 4) {
                return DataLudi.Cursor.NOT_ALLOWED;
            }                        
            if (index.column.name() == 'CancelledAmount' && index.getValue() > 0) {
                return DataLudi.Cursor.POINTER;
            }
        }
    });

View Source JSP 

See Also
ValueColumn.cursor
DisplayOptions.cursorCallback
CellIndex
Examples
Focused Cell
Hello Grid