Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement