Intersoft ClientUI Documentation
IsReadOnlyBinding Property
See Also  Send Feedback
Intersoft.Client.UI.Data Namespace > UXGridView Class : IsReadOnlyBinding Property






Gets or sets the binding that associates the IsReadOnly attribute with a property in the data source.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property IsReadOnlyBinding As Binding
Visual Basic (Usage)Copy Code
Dim instance As UXGridView
Dim value As Binding
 
instance.IsReadOnlyBinding = value
 
value = instance.IsReadOnlyBinding
C# 
[CategoryAttribute("Common Properties")]
public Binding IsReadOnlyBinding {get; set;}
Delphi 
public read-write property IsReadOnlyBinding: Binding; 
JScript 
CategoryAttribute("Common Properties")
public function get,set IsReadOnlyBinding : Binding
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property Binding* get_IsReadOnlyBinding();
public: __property void set_IsReadOnlyBinding( 
   Binding* value
);
C++/CLI 
[CategoryAttribute("Common Properties")]
public:
property Binding^ IsReadOnlyBinding {
   Binding^ get();
   void set (    Binding^ value);
}

Example

The following code shows how to implement the IsReadOnlyBinding to achieve the above scenario.

XAML Copy Code
<Intersoft:UXGridView IsReadOnlyBinding="{Binding Discontinued}">
              
    <Intersoft:UXGridView.Columns>
        <Intersoft:UXGridViewCheckBoxColumn Header="Discontinued" Binding="{Binding Discontinued}"/>
        <Intersoft:UXGridViewTextColumn Header="Category ID" Binding="{Binding CategoryID}" IsReadOnlyBinding="{Binding Discontinued}"/>
        <Intersoft:UXGridViewTextColumn Header="Product ID" Binding="{Binding ProductID}" IsReadOnly="True" Aggregate="Count" FooterFormatString="Count = {0}"/>
        <Intersoft:UXGridViewTextColumn Header="Product Name" Binding="{Binding ProductName}"/>                    
    </Intersoft:UXGridView.Columns>

</Intersoft:UXGridView>

Remarks

You can specify whether a column is editable through the IsReadOnly property in UXGridViewColumn. In more advanced scenarios, you may also want to disable editing on certain columns based on the value of other columns. For examples, if a product has been discontinued, editing in all other columns should be disabled.

To enforce the read only setting to a certain row in this scenario, you can use the IsReadOnlyBinding that is available in both UXGridView and UXGridViewBoundColumn level. The IsReadOnlyBinding at UXGridView level is used to evaluate whether the user can edit the row, while the IsReadOnlyBinding at UXGridViewBoundColumn level is used to evaluate whether the user can edit the cell.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.