Hi;
I'm working with Component One FlexGrid DataGrid, i've added a calculated
field [qty*price] to the DataGrid, when i press the Save Button an error
message is displayed "Cannot Change read Only Property For the Expression
Column" i press Enter and the Data is Saved even the Message "Data is Saved"
is not shown.
So i don't understand why it launches that error message if it saves the
data anyway.
*** The Form Load Code:
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
' Here i add the column with the calculated field
DsDeta1.Tables( 0).Columns.Add( "Sub Total", GetType(Double) , "qty *
price")
daDeta.Fill(DsD eta1)
Flex.Cols(7).Fo rmat = "c"
Flex.Subtotal(A ggregateEnum.Su m, 0, 0, 7, "Total")
Flex.AllowEditi ng = False
End Sub
**** And this is the code for the Save button:
Private Sub btnSave_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnSave.Click
Try
BindingContext( DsDeta1.Tables( 0)).CancelCurre ntEdit()
daDeta.Update(D sDeta1.Tables(0 ))
DsDeta1.Tables( 0).AcceptChange s()
MsgBox("Data is Saved")
Flex.AllowEditi ng = False
Catch ex As Exception
MsgBox("Error :" & ex.Message, MsgBoxStyle.Cri tical)
End Try
End Sub
Any help.... Thanks on advance
--
David Fúnez
Tegucigalpa, Honduras
I'm working with Component One FlexGrid DataGrid, i've added a calculated
field [qty*price] to the DataGrid, when i press the Save Button an error
message is displayed "Cannot Change read Only Property For the Expression
Column" i press Enter and the Data is Saved even the Message "Data is Saved"
is not shown.
So i don't understand why it launches that error message if it saves the
data anyway.
*** The Form Load Code:
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
' Here i add the column with the calculated field
DsDeta1.Tables( 0).Columns.Add( "Sub Total", GetType(Double) , "qty *
price")
daDeta.Fill(DsD eta1)
Flex.Cols(7).Fo rmat = "c"
Flex.Subtotal(A ggregateEnum.Su m, 0, 0, 7, "Total")
Flex.AllowEditi ng = False
End Sub
**** And this is the code for the Save button:
Private Sub btnSave_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnSave.Click
Try
BindingContext( DsDeta1.Tables( 0)).CancelCurre ntEdit()
daDeta.Update(D sDeta1.Tables(0 ))
DsDeta1.Tables( 0).AcceptChange s()
MsgBox("Data is Saved")
Flex.AllowEditi ng = False
Catch ex As Exception
MsgBox("Error :" & ex.Message, MsgBoxStyle.Cri tical)
End Try
End Sub
Any help.... Thanks on advance
--
David Fúnez
Tegucigalpa, Honduras
Comment