'Declaration Public Property ReadOnly As Infragistics.Win.DefaultableBoolean
public Infragistics.Win.DefaultableBoolean ReadOnly {get; set;}
Setting ReadOnly to true will prevent the user from modifying cell values as well as from adding and removing of rows regardless of AllowAdd and AllowDelete property settings. This property caues the IBindingList.ReadOnly implementation in UltraDataSource to return true.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDataSource Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Setting ReadOnly to true on the UltraDataSource will prevent adding/deleting ' of rows as well as cell content modifications across all bands and columns. Me.ultraDataSource1.ReadOnly = True ' You can override that setting on an indivudal band. Me.ultraDataSource1.Band.ReadOnly = DefaultableBoolean.False ' You can also override that setting on an individual column. Me.ultraDataSource1.Band.Columns(0).ReadOnly = DefaultableBoolean.True End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDataSource; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { // Setting ReadOnly to true on the UltraDataSource will prevent adding/deleting // of rows as well as cell content modifications across all bands and columns. this.ultraDataSource1.ReadOnly = true; // You can override that setting on an indivudal band. this.ultraDataSource1.Band.ReadOnly = DefaultableBoolean.False; // You can also override that setting on an individual column. this.ultraDataSource1.Band.Columns[0].ReadOnly = DefaultableBoolean.True; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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