readonlyattribute

Read-only PropertyGrid

Hi, I need to show an object in PropertyGrid with the following requirements: the object and its sub object must be read-only, able to activate PropertyGrid's CollectionEditors. I found a sample that's closely match to what I need but there's an unexpected behaviour I couldn't figure out. I have more than one PropertyGrids each for dif...

PropertyGrid - Dynamically changing ReadOnlyAttribute

Sigh, another PropertyGrid question. I thought I could get around this until I ran into a problem where I couldn't actually avoid it. I have a boolean property that sometimes needs to be read-only and sometimes needs to be changeable depending on the object selected from a TreeView. My question is how can I change the ReadOnlyAttribute...

How can I make a read only version of a class?

I have a class with various public properties which I allow users to edit through a property grid. For persistence this class is also serialized/deserialized to/from an XML file through DataContractSerializer. Sometimes I want to user to be able to save (serialize) changes they've made to an instance of the class. Yet at other times I d...

Read-only input in Android Webkit not working

I have a text input field in my web page that I am using to collect a date (via the jQuery Tools .dateinput). The user does not need to be able to type into the field. A dialog box appears when the field is clicked on. This is a problem on my Motorola Droid, because I don't want the soft-keyboard to appear when the field is clicked. I h...

Is there a difference between readonly and { get; }

Do these statements mean the same thing? int x { get; } readonly int x; ...

Does ReadOnly(true) work with Html.EditorForModel?

Consider the following setup: Model: public class Product { [ReadOnly(true)] public int ProductID { get; set; } public string Name { get; set; } } View: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication4.Mo...