This question is locked. New answers and comments are not allowed.
I'm trying to understand how to get the contents of a cell in grid where the columns are dynamically generated.
For instance, if I want to change the style of a cell to reflect that of it's contents like:
For instance, if I want to change the style of a cell to reflect that of it's contents like:
.CellAction(cell => {
cell.HtmlAttributes[
"style"] = "cls-rankings-" + cell.Text;
})
the contents of cell.text are always empty. Since the columns come from a DataTable I can't hard code them, e.g. cell.DataItem.SomeColumnName
Is there anyway to do this? It seems like it should be trivial - what am I missing?