Gets or sets a value indicating whether the TableBindingAdapter will use the descriptive names stored in coded value domains defined against any columns in the Table.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public bool UseCodedValueDomains { get; set; }
Visual Basic (Declaration)
Public Property UseCodedValueDomains As Boolean

Field Value

trueTruetruetrue (True in Visual Basic) to use CodedValueDomain values; otherwise falseFalsefalsefalse (False in Visual Basic) to use the actual Column values. The default is set to false.

Remarks

Only applies to geodatabase tables and to columns which use coded value domains.

Examples

The code below creates a TableBindingAdapter object for a file geodatabase feature class and fills it with all rows from the Table using the Fill method. The UseCodedValueDomains property is set so that any columns using a CodedValueDomain will display the descriptive name rather than the stored value.
CopyC#
{
  //Open the mountains fill geodatabase feature class
  Table mountains = Table.OpenFileGeodatabaseTable(@"C:\Data\Scotland.gdb", "mountains");

  //Create a new TableBindingAdapter object for the mountains Table
  TableBindingAdapter tableAdapter = new TableBindingAdapter(mountains);
  //Fill the adapter with all the rows from the mountains Table
  tableAdapter.Fill();

  //Set the UseCodedValueDomains property to display the descriptive name for the values in any
  //columns which have a CodedValueDomainDefined
  tableAdapter.UseCodedValueDomains = true;

  //Set the UseColumnAliasNames property to display alias names in the Column headers.
  tableAdapter.UseColumnAliasNames = true;        

  //Note that the BindingSource component and the DataGridView control would normally be
  //instantiated by dragging and dropping them onto a Windows Form from the toolbox.

  //Create a new BindingSource component
  System.Windows.Forms.BindingSource bindingSource1 = new System.Windows.Forms.BindingSource();
  //Set the DataSource to be the tableAdapter object
  bindingSource1.DataSource = tableAdapter;

  //Create a DataGridView control
  System.Windows.Forms.DataGridView dataGridView1 = new System.Windows.Forms.DataGridView();
  //Set the Datasource to be the bindingSource1 object 
  dataGridView1.DataSource = bindingSource1;
}
CopyVB.NET
'Open the mountains file geodatabase feature class
Dim mountainsTable As Table = Table.OpenFileGeodatabaseTable("C:\Data\Scotland.gdb", "mountains")

'Create a new TableBindingAdapter object for the mountains Table
Dim tableAdapter As TableBindingAdapter = New TableBindingAdapter(mountainsTable)

'Set the UseCodedValueDomains property to display the descriptive name for the values in any
'columns which have a CodedValueDomainDefined
tableAdapter.UseCodedValueDomains = True

'Set the UseColumnAliasNames property to display alias names in the Column headers.
tableAdapter.UseColumnAliasNames = True

'Fill the adapter with all the rows from the mountains Table
tableAdapter.Fill()

'Note that the BindingSource component and the DataGridView control would normally be
'instantiated by dragging and dropping them onto a Windows Form from the toolbox.


'Create a new BindingSource component
Dim bindingSource1 As System.Windows.Forms.BindingSource = New System.Windows.Forms.BindingSource()
'Set the DataSource to be the tableAdapter object
bindingSource1.DataSource = tableAdapter

'Create a DataGridView control
Dim dataGridView1 As System.Windows.Forms.DataGridView = New System.Windows.Forms.DataGridView()
'Set the Datasource to be the bindingSource1 object 
dataGridView1.DataSource = bindingSource1

See Also