Next
Update
Prev

The user-defined label at the data cell can be set by using the labelJsFunction attribute in <DataGridColumn>. This sample Grid demonstrates how to set the user-defined label in the Quarter column.

...
<DataGridColumn ... dataField="Quarter" ... color="#0000FF" labelJsFunction="convertQuarter" ... />
...
					
function convertQuarter(item, value, column) {
  var month = item["Month"];
  var quarter = item["Quarter"];
  var result = "";
  
  if (month != null)
    result += month +"th month";
    
  if (quarter != null) {
    if (result.length > 0)
      result += " (" + quarter + ")";
    else
      result = quarter;
  }
  
  return result;
}

© 2017 KoolChart. All rights reserved.