DataGridBoolColumn.FalseValue Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the actual value used when setting the value of the column to 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
Property Value
The value, typed as Object.
- Attributes
Examples
The following code example sets the TrueValue, FalseValue, and NullValue properties of a 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
Remarks
The FalseValue, NullValue, and TrueValue properties determine the actual values pushed into the data source.
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.