'Declaration Public Overloads Sub ResetCachedValue( _ ByVal column As UltraDataColumn _ )
public void ResetCachedValue( UltraDataColumn column )
You can use the UltraDataRow's ResetCachedValues method to clear values of all cells. The UltraDataRowsCollection also exposes UltraDataRowsCollection.ResetCachedValues method that lets you clear cell values of all rows in a row collection.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDataSource Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ds As UltraDataSource = New UltraDataSource() ds.Band.Columns.Add("Col1", GetType(String)) ds.Rows.Add() ' Calling ResetCachedValues on the UltraDataSource will clear cached ' cell values in all rows in all bands. ds.Rows(0)("Col1") = "Value" Debug.WriteLine("Before reset cell value = " & ds.Rows(0)("Col1")) ds.ResetCachedValues() Debug.WriteLine("After reset cell value = " & ds.Rows(0)("Col1")) ' Calling ResetCachedValues on a band will clear the cached cell values ' in all rows associated with the band. ds.Rows(0)("Col1") = "Value" Debug.WriteLine("Before reset cell value = " & ds.Rows(0)("Col1")) ds.Band.ResetCachedValues() Debug.WriteLine("After reset cell value = " & ds.Rows(0)("Col1")) ' Calling ResetCachedValues on a row collection will clear the cached ' cell values in all rows in the row collection. ds.Rows(0)("Col1") = "Value" Debug.WriteLine("Before reset cell value = " & ds.Rows(0)("Col1")) ds.Rows.ResetCachedValues() Debug.WriteLine("After reset cell value = " & ds.Rows(0)("Col1")) ' Cached cell values associated with a column can be cleared across ' all rows using ResetCachedValues method off the UltraDataColumn ' object. ds.Rows(0)("Col1") = "Value" Debug.WriteLine("Before reset cell value = " & ds.Rows(0)("Col1")) ds.Band.Columns("Col1").ResetCachedValues() Debug.WriteLine("After reset cell value = " & ds.Rows(0)("Col1")) ' Calling ResetCachedValues on a row will clear the cached cell values ' in that row. ds.Rows(0)("Col1") = "Value" Debug.WriteLine("Before reset cell value = " & ds.Rows(0)("Col1")) ds.Rows(0).ResetCachedValues() Debug.WriteLine("After reset cell value = " & ds.Rows(0)("Col1")) ' Cached value can be cleared on a single cell using the ' ResetCachedValue method of the row and passing in the column. ds.Rows(0)("Col1") = "Value" Debug.WriteLine("Before reset cell value = " & ds.Rows(0)("Col1")) ds.Rows(0).ResetCachedValue("Col1") Debug.WriteLine("After reset cell value = " & ds.Rows(0)("Col1")) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDataSource; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { UltraDataSource ds = new UltraDataSource( ); ds.Band.Columns.Add( "Col1", typeof( string ) ); ds.Rows.Add( ); // Calling ResetCachedValues on the UltraDataSource will clear cached // cell values in all rows in all bands. ds.Rows[0]["Col1"] = "Value"; Debug.WriteLine( "Before reset cell value = " + ds.Rows[0]["Col1"] ); ds.ResetCachedValues( ); Debug.WriteLine( "After reset cell value = " + ds.Rows[0]["Col1"] ); // Calling ResetCachedValues on a band will clear the cached cell values // in all rows associated with the band. ds.Rows[0]["Col1"] = "Value"; Debug.WriteLine( "Before reset cell value = " + ds.Rows[0]["Col1"] ); ds.Band.ResetCachedValues( ); Debug.WriteLine( "After reset cell value = " + ds.Rows[0]["Col1"] ); // Calling ResetCachedValues on a row collection will clear the cached // cell values in all rows in the row collection. ds.Rows[0]["Col1"] = "Value"; Debug.WriteLine( "Before reset cell value = " + ds.Rows[0]["Col1"] ); ds.Rows.ResetCachedValues( ); Debug.WriteLine( "After reset cell value = " + ds.Rows[0]["Col1"] ); // Cached cell values associated with a column can be cleared across // all rows using ResetCachedValues method off the UltraDataColumn // object. ds.Rows[0]["Col1"] = "Value"; Debug.WriteLine( "Before reset cell value = " + ds.Rows[0]["Col1"] ); ds.Band.Columns["Col1"].ResetCachedValues( ); Debug.WriteLine( "After reset cell value = " + ds.Rows[0]["Col1"] ); // Calling ResetCachedValues on a row will clear the cached cell values // in that row. ds.Rows[0]["Col1"] = "Value"; Debug.WriteLine( "Before reset cell value = " + ds.Rows[0]["Col1"] ); ds.Rows[0].ResetCachedValues( ); Debug.WriteLine( "After reset cell value = " + ds.Rows[0]["Col1"] ); // Cached value can be cleared on a single cell using the // ResetCachedValue method of the row and passing in the column. ds.Rows[0]["Col1"] = "Value"; Debug.WriteLine( "Before reset cell value = " + ds.Rows[0]["Col1"] ); ds.Rows[0].ResetCachedValue("Col1"); Debug.WriteLine( "After reset cell value = " + ds.Rows[0]["Col1"] ); }
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