Visual C# Developer Center >
Visual C# Forums
>
Visual C# IDE
>
How do I get VS2008 to stop stomping on my code?
How do I get VS2008 to stop stomping on my code?
- I have an app with a couple hundred textboxes on a dozen tabpages that are bound to various datatables.
VS keeps setting the columns to readonly, I go through and change them back and an hour or so later it is corrupted again.
I can't find what setting|config is causing this behavior.
Does anyone know how to fix it?
All Replies
Hi wg_self,
Welcome to MSDN foums!
Based on your description, I’m still not sure about the following points.
1) What type of datatable are you using? Strong typed dataset or untyped?
2) How do you bind the textboxes and tabpages?
3) Would you mind provide the detail steps for reproducing this problem?
Please update the thread and we will have a further discussion.
Best Regards
Yichun Feng
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Yichun,
I have a strong typed dataset comprised of about 100 tables in SQLServer. The datatables are either mapped to a single database table or to a join of two or more. Each datatable has a binding source and the textboxes are bound to to the binding sources. The tabpages are not bound. Most of them work fine but several, comprising about 100 fields across them keep getting set to readonly by VS and I can't figure out how to make it stop. The designer has to be reading a setting from somewhere that is telling it to set it but I can't find anything in the documentation that describes where.
Thanks,
Glen- Has this problem been resolved? If not then please provide the information Yichun_Feng requested. I'm especially curious about your comment about the columns being set to read-only. Data columns and textboxes are independent so I'm confused as to whether the columns in the DS are being marked read-only or the textboxes are.
I'm not aware of any scenario when binding a value to a control would cause it to auto-set the control's ReadOnly property to true. However if the control were manually changed then the setting would stick. Having said that do be aware that the data columns in the dataset can be set to read-only. I don't believe that has any impact on the UI though. In databinding the UI and the underlying data are not implicitly linked except where requested because a single data item can be linked to multiple controls.
Michael Taylor - 11/10/09
http://p3net.mvps.org - Michael,
I have been having a discussion here:
http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/f04bab69-6cca-47dc-ad88-c1e1e0bcc64e
The upshot is that Kira feels the only way to work around the problem is to walk the controls in form.load and set the datatable columns to readonly=false,
My current work around is to go through and change the hundreds of instances just before compiling. This is quite tedious but at least the app works fine. VS will later change them back to readonly for some unknown reason.
Thanks,
Glen


