DataGridBoolColumn.FalseValue Propriedade

Definição

Obtém ou define o valor real usado ao definir o valor da coluna como false.

public:
 property System::Object ^ FalseValue { System::Object ^ get(); void set(System::Object ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))]
public object FalseValue { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))>]
member this.FalseValue : obj with get, set
Public Property FalseValue As Object

Valor da propriedade

Object

O valor, digitado como Object.

Atributos

Exemplos

O exemplo de código a seguir define o TrueValue, FalseValuee NullValue as propriedades de um DataGridBoolColumn.

private:

   void SetBoolColumnValues()
   {
      DataGridBoolColumn^ myGridColumn;
      
      // Get the DataGridBoolColumn you are setting.
      myGridColumn = dynamic_cast<DataGridBoolColumn^>(myDataGrid->TableStyles[ "Customers" ]->GridColumnStyles[ "Current" ]);
      
      // Set TrueValue, FalseValue, and NullValue.
      myGridColumn->TrueValue = true;
      myGridColumn->FalseValue = false;
      myGridColumn->NullValue = Convert::DBNull;
   }
private void SetBoolColumnValues(){
   DataGridBoolColumn myGridColumn;
   // Get the DataGridBoolColumn you are setting.
   myGridColumn = (DataGridBoolColumn) myDataGrid.
   TableStyles["Customers"].GridColumnStyles["Current"];
   // Set TrueValue, FalseValue, and NullValue.
   myGridColumn.TrueValue = true;
   myGridColumn.FalseValue = false;
   myGridColumn.NullValue = Convert.DBNull;
}
Private Sub SetBoolColumnValues()
   Dim myGridColumn As DataGridBoolColumn 
   ' Get the DataGridBoolColumn you are setting.
   myGridColumn = CType(myDataGrid.TableStyles _
   ("Customers").GridColumnStyles("Current"), DataGridBoolColumn)
   ' Set TrueValue, FalseValue, and NullValue.
   myGridColumn.TrueValue = true
   myGridColumn.FalseValue = false
   myGridColumn.NullValue = Convert.DBNull
End Sub

Comentários

As FalseValuepropriedades e TrueValue as NullValuepropriedades determinam os valores reais enviados para a fonte de dados.

Aplica-se a