User-1961942910 posted
(Using 3.5 SP1)
I was trying to set one of my columns read-only using the MetaData, like this:
[ReadOnly(true)]
public object WhenCreated { get; set; }
The column still shows up as editable in the gridview and the detailsview. I did read elsewhere in the forum that you can go into the ORM Designer and set the Read Only property for a column there, and that worked. I would prefer not to do it
there, as sometimes I make changes to my database and just completely wipe the model and re-add the tables. That obviously blows away any settings for ReadOnly that were done in the model.
Is there any way to force ReadOnly in my <table>.cs file? If it worked like in my example code above, using the metadata, that would be great. As it is, it doesn't seem like the ReadOnly attribute does anything.