Each of my columns will be a complex type.
Using custom formatting I'd like to be able to display the text of one property, then colour the cell (or do anything really) dependant on the other property.
So for example:
public class MyRowObject
{
public MyCellObject Cell1 { get; set; }
public MyCellObject Cell2 { get; set; }
public SomeOtherCellObject Cell3 { get; set; }
}
public class MyCellObject
{
public string MyDisplayText { get; set; }
public int MyNumber { get; set; }
}
then use a custom formatter javascript function to do stuff, for example:
function formatCourseData(cellValue, options, rowObject) {
var linkHTML = cellValue.MyDisplayText;
if (cellValue.MyNumber > 10) {
//format the html in some way
}
return linkHTML;
}
Now I know I cannot do cellValue.MyDisplayText but this or something like is what I would like to be able to do.
Is this possible?
Is it documented anywhere? (I've looked, but cannot find anything).
thanks in advance.