473,322 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Error: Cannot Change read Only Property For the Expression Column

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(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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(DsDeta1)
Flex.Cols(7).Format = "c"

Flex.Subtotal(AggregateEnum.Sum, 0, 0, 7, "Total")
Flex.AllowEditing = False
End Sub
**** And this is the code for the Save button:
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSave.Click
Try
BindingContext(DsDeta1.Tables(0)).CancelCurrentEdi t()
daDeta.Update(DsDeta1.Tables(0))
DsDeta1.Tables(0).AcceptChanges()

MsgBox("Data is Saved")

Flex.AllowEditing = False

Catch ex As Exception
MsgBox("Error :" & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub

Any help.... Thanks on advance
--
David Fúnez
Tegucigalpa, Honduras

Nov 21 '05 #1
1 3535
From what I see from the code you posted is that you don't allow any editing
from the time the application is run.

Behind your save button the message box will be shown as you aren't testing
anything. Example:

AllowChanges = False, but show that you have saved the changes - wrong

The error message you are receiving isn't being caught in your try block.
How is it possible to change a ReadOnly Property? You cannot because you
aren't able to write to it. Maybe the changes are shown in the flexigrid, but
not actually saving it.
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Languageâ€, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
13
by: lithoman | last post by:
I'm stumped here. I run the procedure Batch_Select against the database with @ID=18 and I get the expected data. When it loads into a SqlDataReader, it gets messed up somehow. Initially, after the...
10
by: ApexData | last post by:
Private Sub Command35_Click() MsgBox (BestSoundex2(, 6)) DoCmd.RunSQL "UPDATE SET = (BestSoundex2(, 6))" End Sub The Msgbox displays just fine, but the SQL statement gives the following...
6
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am...
0
by: SMH | last post by:
Hi All, I am currently learning .Net 2, studying for 70-528. I've hit a bit of a brick wall with DataColumn.Expression. As I understand it, this can be used to (For example) concatenate two...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.