Editing still possible when AllowEdit = False

  • Thread starter Thread starter Erik
  • Start date Start date
E

Erik

I'm using a bound control, a textbox bound to a column in a dataview.
Despite setting the AllowEdit property to False, changes in the text in
the textbox are saved to the dataview and underlying dataset. When using
the update command of the dataadapter these changes are saved to the
database.
When editing a value in code AllowEdit has to be set to True.
So AllowEdit seems not to work for bound controls, Is this true or am I
missing something. I find it rather strange that when AllowEdit = False
you can still edit values in the dataview table

Thanks Erik
 
Hello,

Normally this works. But I assume the Update Command overwrites this.
So my suggestion would be to change the Update command text in
InitializeComponents.
Please try this and let me know of the results.

Regards,
Rami Saad
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
Rami said:
Hello,

Normally this works. But I assume the Update Command overwrites this.
So my suggestion would be to change the Update command text in
InitializeComponents.
Please try this and let me know of the results.

Regards,
Rami Saad
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Sorry, but I don't understand what you expect from changing the update
command. Of course when I replace the commandtext by "" it will be
impossible to save my changes to the database, but still my dataview and
dataset are changed. I'm still wondering why I can edit my dataview when
AllowEdit = False, using bound controls

Regards
Erik Nielsen
 
Back
Top