SMART datagrid v.1 > Classes

Back  Forward

DataLudi.IconCellRenderer  class

Among the image list which has been set in DataColumn.imageList, it displays the image located in GridStyles.iconIndex together with the text. If specify textVisible property of renderer as false, it will not display the text. It specifies the display location of image by GridStyles.iconLocation. When GridStyles.iconLocation is CENTER, the text will not be displayed either. 

It specifies the type as "icon" when setting the column renderer. 

Base Classes
DataCellRenderer > GridObject > EventAware > DLBase
Constructor
function IconCellRenderer ();
Properties
textVisible
Inherited Properties
GridObject.owner
DataCellRenderer.showTooltip
Inherited Methods
EventAware.addListener
DLBase.assign
GridObject.ctor
DataCellRenderer.ctor
DLBase.getProperties
DLBase.getProperty
EventAware.removeListener
DLBase.setProperties
DLBase.setProperty
DLBase.toggle

 

Code -1
    grid.setColumns([{
        name: "Country",
        fieldName: "Country",
        width: "80",
        imageList: "images1",
        renderer: {
            type: "icon",
            textVisible: false
        },
        dynamicStyles: "iconStyles2",
        styles: {
            iconIndex: 0,
            iconLocation: "left",
            iconAlignment: "center",
            iconOffset: 2
        },
        header: {
            text: "textVisible\n=false"
        }
    },
    ...
    ]);
See Also
textVisible
ImageCellRenderer
ShapeCellRenderer
Examples
Icon Cell Renderer