バージョン

DefaultValue プロパティ

この列のセルに値が指定されていない場合に使用されるデフォルト値。
シンタックス
'宣言
 
Public Property DefaultValue As Object
public object DefaultValue {get; set;}
使用例
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()
        Dim col As UltraDataColumn = ds.Band.Columns.Add("Col1", GetType(String))

        ' Set the column's DefaultValue to string "Default".
        col.DefaultValue = "Default"

        Dim row As UltraDataRow = ds.Rows.Add()

        ' When no value is set, column's DefaultValue will be used.
        ' Following should print out the string "Default".
        Debug.WriteLine("Before setting cell value = " & row(col))

        row(col) = "Test"
        Debug.WriteLine("After setting cell value = " & row(col))
    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( );
			UltraDataColumn col = ds.Band.Columns.Add( "Col1", typeof( string ) );

			// Set the column's DefaultValue to string "Default".
			col.DefaultValue = "Default";
			
			UltraDataRow row = ds.Rows.Add( );

			// When no value is set, column's DefaultValue will be used.
			// Following should print out the string "Default".
			Debug.WriteLine( "Before setting cell value = " + row[ col ] );

            row[ col ] = "Test";
			Debug.WriteLine( "After setting cell value = " + row[ col ] );
		}
参照