"Depending on the value of a status field the user should see an edit button or not in the grid row"
--> this status field is a real property of the model and resides also in the database.
I don't like this, because we send data over the wire not really needed by the user, only for conditional hiding.
If we could access via lambda expression the item row itself, like in WebGrid from MVC....
sc.Add(x => x.PropText).SetCellValueHidden(x => x.PropStatus > 10 ? true : false);
sc.Add(x => x.PropDate).SetFormatter(x => x.PropDate.Year < 2000 ? "'date'" : "'your own function'");
sc.Add(x => x.Prop1).SetEditable(x => x.PropStatus > 10 ? true : false);
But is this possible?
I don't think so, the 'frame' of jqGrid is build in the view, resulting in the final html page and is then receiving the data via a json result.
The options of the jqGrid are at that moment already defined. We don't know the values of the fields at the moment the code in the example above is executed.
Of am I thinking wrong?