General information
Category:
Coding, syntax and commands
Environment versions
Network:
Windows 2003 Server
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only