バージョン

ResetCachedValues メソッド (UltraDataBand)

このバンドに関連付けられている行のセル値をクリアします。こうすると、UltraDataSource コンポーネントは次回これらのセルの値が必要になったときに CellDataRequested イベントを発生させます。
シンタックス
'宣言
 
Public Sub ResetCachedValues() 
public void ResetCachedValues()
解説

UltraDataRowsCollection の UltraDataRowsCollection.ResetCachedValues メソッドを使用して、特定の列コレクションのキャッシュされたセル値をクリアすることができます。UltraDataRow も UltraDataRow.ResetCachedValues メソッドを公開します。

使用例
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"] );
		}
参照