How would you gray out non editable fields?
You didn't say where you want to do this.
In a TemplatedColumn: style="color: gray;"
It would be in an ultragrid column, but only in columns where AllowEdit = Yes. I tried doing this in the Initialize Row event but it didnt work.
foreach(UltraGridCell cell in e.Row.Cells)
{
if(cell.AllowEditing == AllowEditing.No)
cell.Style.ForeColor = System.Drawing.Color.Blue;
}
IIRC, InitializeRow happens once for each row, before the row is bound to any data. Are you trying to gray out entire columns, or are you turning AllowEditing on or off differently for each row?
Im trying to have any fields that are non editable to be a different color then those that are editable.
can we provide allowedit = no on the entire column?
MLongin said: Im trying to have any fields that are non editable to be a different color then those that are editable.
Where is cell.AllowEditing being set? If that depends upon the data values, then you need to do it after the data is bound.