N
nick
Hi
What is the proper way of setting a boolean column (checkbox) to
"true" by default? It seems that the datagrid won't accept inserts if
the default is true.
BoolColPaid = new DataGridBoolColumn();
BoolColPaid.MappingName = "paid";
BoolColPaid.HeaderText = "paid";
BoolColPaid.FalseValue = false;
BoolColPaid.TrueValue = true;
BoolColPaid.AllowNull = false;
BoolColPaid.NullText = true.ToString();
BoolColPaid.NullValue = true;
Here's defining the dataset's paid column:
<xs:element name="paid" type="xs:boolean" minOccurs="0" />
Here's setting the paid column's default to true:
dataset1.Tables[0].Columns["paid"].DefaultValue = true;
I'm using Access database.
What is the proper way of setting a boolean column (checkbox) to
"true" by default? It seems that the datagrid won't accept inserts if
the default is true.
BoolColPaid = new DataGridBoolColumn();
BoolColPaid.MappingName = "paid";
BoolColPaid.HeaderText = "paid";
BoolColPaid.FalseValue = false;
BoolColPaid.TrueValue = true;
BoolColPaid.AllowNull = false;
BoolColPaid.NullText = true.ToString();
BoolColPaid.NullValue = true;
Here's defining the dataset's paid column:
<xs:element name="paid" type="xs:boolean" minOccurs="0" />
Here's setting the paid column's default to true:
dataset1.Tables[0].Columns["paid"].DefaultValue = true;
I'm using Access database.