Xceed Grid for WinForms v4.3 Documentation
Xceed.Grid.v4.3 Assembly / Xceed.Grid Namespace / GridControl Class / ReadOnly Property


In This Topic
    ReadOnly Property (GridControl)
    In This Topic
    Gets or sets a boolean value indicating if the grid can be edited.
    Syntax
    'Declaration
     
    <DescriptionAttribute("Indicates if the grid can be edited.")>
    <CategoryAttribute("Behavior")>
    <ApplyToDesignerAttribute(False)>
    Public Property ReadOnly As Boolean
    'Usage
     
    Dim instance As GridControl
    Dim value As Boolean
     
    instance.ReadOnly = value
     
    value = instance.ReadOnly
    [Description("Indicates if the grid can be edited.")]
    [Category("Behavior")]
    [ApplyToDesigner(false)]
    public bool ReadOnly {get; set;}

    Property Value

    true if the grid cannot be edited; false (default) otherwise.
    Remarks

    Setting ReadOnly to true does not prevent the content of the grid from being modified via code. For example, cell.Value = "hello";

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also