J
James Goodman
I have a number of bool columns within a datagrid, but they dont work as
expected.
The underlying table is Access 2000. The datatype for the underlying fields
is Yes/No.
I am attempting to create DataGridBoolColumns using the following code:
Private Const TRUE_VAL = -1
Private Const FALSE_VAL = 0
Private Const NULL_VAL = 0
Me.dgdTimDatPlotChkForks = New DataGridBoolColumn()
Me.dgdTimDatPlotChkForks.HeaderText = "FORKS"
Me.dgdTimDatPlotChkForks.MappingName = "FORKS"
Me.dgdTimDatPlotChkForks.Width = 75
Me.dgdTimDatPlotChkForks.AllowNull = False
Me.dgdTimDatPlotChkForks.TrueValue = TRUE_VAL
Me.dgdTimDatPlotChkForks.FalseValue = FALSE_VAL
Me.dgdTimDatPlotChkForks.NullValue = NULL_VAL
I need my checkboxes to not allow null; they must be either true or false,
with a default value of false.
However, when the app is run, they are always tri-state null (greyed out), &
even if they are changed to either true/false, as soon as the user navigates
from the column it returns to null.
Any suggestions as to what is wrong?
--
Cheers,
James Goodman MCSE, MCDBA
http://www.angelfire.com/sports/f1pictures
expected.
The underlying table is Access 2000. The datatype for the underlying fields
is Yes/No.
I am attempting to create DataGridBoolColumns using the following code:
Private Const TRUE_VAL = -1
Private Const FALSE_VAL = 0
Private Const NULL_VAL = 0
Me.dgdTimDatPlotChkForks = New DataGridBoolColumn()
Me.dgdTimDatPlotChkForks.HeaderText = "FORKS"
Me.dgdTimDatPlotChkForks.MappingName = "FORKS"
Me.dgdTimDatPlotChkForks.Width = 75
Me.dgdTimDatPlotChkForks.AllowNull = False
Me.dgdTimDatPlotChkForks.TrueValue = TRUE_VAL
Me.dgdTimDatPlotChkForks.FalseValue = FALSE_VAL
Me.dgdTimDatPlotChkForks.NullValue = NULL_VAL
I need my checkboxes to not allow null; they must be either true or false,
with a default value of false.
However, when the app is run, they are always tri-state null (greyed out), &
even if they are changed to either true/false, as soon as the user navigates
from the column it returns to null.
Any suggestions as to what is wrong?
--
Cheers,
James Goodman MCSE, MCDBA
http://www.angelfire.com/sports/f1pictures