DataView AllowEdit & Simple Binding

A

Aaron Lind

Is it possible to get a form with textboxes and simple binding to stop
the editing of the row? I bind to the view and let the
CurrencyManager set the specific row:

Me.txtMedicationNumber.DataBindings.Add("text", medsView,
"medication_num")

but I can't find a way to stop any editing whether it be on the
specific field or after ending the edit itself. Settings the
AllowInsert & AllowDelete works fine in this type of form whether you
are adding or deleting via the DataView or the CurrencyManager. Any
Suggestions?

Thanks,

A
 
W

William Ryan

Aaron:
If I understand the problem correctly, can't you just prevent editing via
the UI? Or could you set the DataColumn's .ReadOnly property to true?
 
A

Aaron Lind

William,

I understand where you are coming from but I was looking for a more
robust solution versus having to alter the readonly state of all
controls on all my forms. After digging through some of the postings
surrounding this issue it would appear that it is possible to simple
bind to a textbox with a DataView and get the allowEdit to work
correctly. I have yet to see any examples of how this might work. This
way I could send the settings from the server and no UI changes need to
be made.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top