Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to disable the Addnew button after click ?
Message
From
01/12/2010 10:41:58
 
 
To
01/12/2010 08:07:52
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01491331
Message ID:
01491404
Views:
29
>Hi,
>I want disable the Addnew button after user click it, then user in add new record mode,
>then I want to enable it until they save the record.
>If I don't disable the Addnew button during add new record, I find that it may cause error when click
>the Addnew button again.
>
>So I put the code in the Addnew button click event, it occurs error.

The approach you are taking seems OK. But, as before, the exception message that you mention ("Item cannot be added to a read-only or fixed-size list.") sounds as if it is generated by the BindingSource.AddNew() which will be triggered by the button click rather than by the setting of the BindingSource.AllowNew property.
Previous
Reply
Map
View

Click here to load this message in the networking platform