R
Robert Eastham
Hi
I have a form that binds a few textboxes and a checkbox to a view.
It seems that with the checkbox databound the row is always put
into a modified state.
If I do not bind the checkbox all works fine.
Am using CF SP2.
What am I doing something here?
Thanks for any help!!
In the code here I am simply moving to the next row..nothing is changed on
the form
temp = ds.Tables[0].Rows[0].RowState.ToString() ; <-- temp = "Unchanged"
panel1.BindingContext[dv].Position += 1 ;
temp = ds.Tables[0].Rows[0].RowState.ToString() ; <-- temp = "Modified"
The binding statement
chkGrabDaily.DataBindings.Add("Checked", dv, "GrabDailyHistory") ;
The DataView is simply
dv.Table = ds.Tables[0] ;
The dateview field
? dv[0]["GrabDailyHistory"]
{true}
System.ValueType: {System.Boolean}
False: 0
FalseString: "False"
m_value: true
True: 1
TrueString: "True"
The DataSet field
? ds.Tables[0].Columns["GrabDailyHistory"]
{System.Data.DataColumn}
System.ComponentModel.MarshalByValueComponent: {System.Data.DataColumn}
_columnName: "GrabDailyHistory"
_columnPrefix: ""
_columnUri: null
AllowDBNull: false
allowNull: false
autoIncrement: false
AutoIncrement: false
autoIncrementCurrent: 0
AutoIncrementSeed: 0
autoIncrementSeed: 0
autoIncrementStep: 1
AutoIncrementStep: 1
Caption: "GrabDailyHistory"
caption: null
ColumnMapping: Element
columnMapping: Element
ColumnName: "GrabDailyHistory"
Computed: false
DataType: {"System.Boolean"}
dataType: {"System.Boolean"}
defaultValue: {true}
DefaultValue: {true}
description: ""
dttype: ""
encodedColumnName: null
EncodedColumnName: "GrabDailyHistory"
errors: 0
Expression: ""
expression: <undefined value>
extendedProperties: <undefined value>
ExtendedProperties: {System.Data.PropertyCollection}
HasData: true
hashCode: 1624
Item: <cannot view indexed property>
Item: <cannot view indexed property>
MaxLength: -1
maxLength: -1
Namespace: ""
onPropertyChangingDelegate: <undefined value>
Ordinal: 8
ordinal: 8
Prefix: ""
readOnly: false
ReadOnly: false
simpleType: <undefined value>
SimpleType: <undefined value>
sortIndex: <undefined value>
SortIndex: {System.Data.Index}
Storage: {System.Data.Common.BooleanStorage}
storage: {System.Data.Common.BooleanStorage}
table: {System.Data.DataTable}
Table: {System.Data.DataTable}
Unique: false
unique: false
I have a form that binds a few textboxes and a checkbox to a view.
It seems that with the checkbox databound the row is always put
into a modified state.
If I do not bind the checkbox all works fine.
Am using CF SP2.
What am I doing something here?
Thanks for any help!!
In the code here I am simply moving to the next row..nothing is changed on
the form
temp = ds.Tables[0].Rows[0].RowState.ToString() ; <-- temp = "Unchanged"
panel1.BindingContext[dv].Position += 1 ;
temp = ds.Tables[0].Rows[0].RowState.ToString() ; <-- temp = "Modified"
The binding statement
chkGrabDaily.DataBindings.Add("Checked", dv, "GrabDailyHistory") ;
The DataView is simply
dv.Table = ds.Tables[0] ;
The dateview field
? dv[0]["GrabDailyHistory"]
{true}
System.ValueType: {System.Boolean}
False: 0
FalseString: "False"
m_value: true
True: 1
TrueString: "True"
The DataSet field
? ds.Tables[0].Columns["GrabDailyHistory"]
{System.Data.DataColumn}
System.ComponentModel.MarshalByValueComponent: {System.Data.DataColumn}
_columnName: "GrabDailyHistory"
_columnPrefix: ""
_columnUri: null
AllowDBNull: false
allowNull: false
autoIncrement: false
AutoIncrement: false
autoIncrementCurrent: 0
AutoIncrementSeed: 0
autoIncrementSeed: 0
autoIncrementStep: 1
AutoIncrementStep: 1
Caption: "GrabDailyHistory"
caption: null
ColumnMapping: Element
columnMapping: Element
ColumnName: "GrabDailyHistory"
Computed: false
DataType: {"System.Boolean"}
dataType: {"System.Boolean"}
defaultValue: {true}
DefaultValue: {true}
description: ""
dttype: ""
encodedColumnName: null
EncodedColumnName: "GrabDailyHistory"
errors: 0
Expression: ""
expression: <undefined value>
extendedProperties: <undefined value>
ExtendedProperties: {System.Data.PropertyCollection}
HasData: true
hashCode: 1624
Item: <cannot view indexed property>
Item: <cannot view indexed property>
MaxLength: -1
maxLength: -1
Namespace: ""
onPropertyChangingDelegate: <undefined value>
Ordinal: 8
ordinal: 8
Prefix: ""
readOnly: false
ReadOnly: false
simpleType: <undefined value>
SimpleType: <undefined value>
sortIndex: <undefined value>
SortIndex: {System.Data.Index}
Storage: {System.Data.Common.BooleanStorage}
storage: {System.Data.Common.BooleanStorage}
table: {System.Data.DataTable}
Table: {System.Data.DataTable}
Unique: false
unique: false