SMART datagrid v1.4 > Examples
중요한 데이터를 표시하고 싶을 때 cell의 모서리 중 하나에 celltip을 표시할 수 있다. style속성을 이용하여 celltipLocation을 지정하면 지정된 위치에 celltip이 출력된다.
컬럼을 구성할 때 styles에 celltipLocation을 설정하면 해당 컬럼에 celltip이 표시된다.
{
"name": "Quantity",
"fieldName": "quantity",
"width": 60,
"renderer": {
"type": "shape"
},
"styles": {
"textAlignment": "far",
"celltipLocation": "rightTop",
},
...
}
다이나믹스타일을 이용하여 원하는 cell에만 celltip을 표시 할 수 있다.
{
"name": "UnitPrice",
"fieldName": "unit_price",
"dynamicStyles": [{
"expression": "value > 500",
"styles": {
"background": "#10000000",
"celltipLocation" : DataLudi.CelltipLocation.LEFT_TOP
}
}, {
"expression": "value > 700",
"styles": {
"background": "#20000000"
}
}, {
"expression": "value > 800",
"styles": {
"background": "#30000000"
}
}],
...
}