I have a objectid column in ultragrid that is readonly and I allow user to insert new row to grid and new objectid is generated from database insert operation. Now when I try to change it to new value through code I get objectid is readonly. Is there a way that the column is readonly for direct user editing but can be updated from code.
You don't need to change the cell activation in order to change the value in code. In fact, you don't need to do anything with the cell. you can use the ListObject propery:
var dataRow = gridRow.ListObject as DataRow;
dataRow["ID"] = value;
I fixed this one. I had set the readonly column in Datatable. Instead of that I set that in ultragrid and before updating changed the CellActivation property and restored it after changing it.