At the time of populating the table, is it possible to refer to a column in a previous row?
So something like this: Refer to an other columns value in a MVC3 Razor WebGrid Except I want to refer to the same column but from a previous role.
For example, this is the column I'd like to know all values for:
//check if statement before creating it
foreach(Column("Prop") c in allRowsCollection) {
if(c.Value = "something") { //check if there is already a row with a specific value for this column
grid.Column("Prop", "example1"),
}
else {
grid.Column("Prop", "example2"),
}
}
So every time I add a new row, I'd like to compare it with the previous one.
Is this possible? If not, is there some workaround?