Hi what i would like to do is bind the AllowEdit property of a cell to a method on the bound object called
public bool IsReadOnly(string propertyName)
where propertyName is the Column Name of the Cell
is this possible (perhaps using something like http://msdn.microsoft.com/en-us/library/aa348824.aspx)
and if so could someone help me with some example xaml style to do this (sorry i'm very new to this)
thanks in advance
Gautam
Hello Gautam,
The cell does not have a suitable property that you can bind to to make it read only. The Field's Settings have but that would make all the cells in that field read only. I am also not sure if this method will be appropriate of achieving this. The easiest and quickest way to achieve this using your approach is to handle the EditModeStarting method and set the e.Cancel to the result of the IsReadOnly method :
e.Cancel = IsReadOnly(e.Cell.Field.Name);
oh dear...that isn't very good...
I would also want to set the cell formatting of this (all editable cells to be pale yellow or something), but i guess you're saying that's not possible with the current grid?