ComponentOne Data Source for Entity Framework
C1.LiveLinq.LiveViews Namespace / View Class / IsReadOnly Property

In This Topic
    IsReadOnly Property
    In This Topic
    Gets a value indicating whether this view is read-only, not updatable.
    Public ReadOnly Property IsReadOnly As System.Boolean
    public System.bool IsReadOnly {get;}

    Properties exposed by a view can be updatable or read-only. Updatable properties of a view can be modified directly in the view.

    All properties of a read-only (not updatable) view are read-only. In an updatable view, properties directly corresponding to base data (source) properties are updatable, calculated properties are read-only. For example, in a view from x in X select new { x.P, Q = x.Q + 1 } P is updatable and Q is read-only.

    Read-only properties of a view cannot be modified directly in the view, but they still reflect up-to-date values of the source, so the difference is often not critical, you can always modify corresponding property in the source, that will automatically change the property in the view.

    Also, a read-only view cannot be cleared or its rows deleted or new rows added directly in the view (but all these actions can be performed on the source data collection and they will normally result in the corresponding changes of the view).

    A Join view is read-only by default, but one of its two parts can be made updatable using the C1.LiveLinq.LiveViewExtensions.AsUpdatable<T> method.

    See Also