Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
I already generally seen your post. But my question not this.
On Two days, i confirm the question about BindingNavigatorAddNewItem button .
You can try it.
The step1 . Add control BindingSource, BindingNavigator and Datagridview( 1 DataGridViewTextBoxColumn).
2. set BindingNavigator1.BindingSource= BindingSource1 , Datagridview1.datasource = BindingSource1 and AllowUserToAddRows = False.
3. Click the BindingNavigatorAddNewItem Button, and entry some of data, after press enter key.
4. Only press Esc will display error.
(Important) I analysis, In step 3. code is BindingSource.AddNew() , user can entry some of data, after when the user finish and press enter.
it is thanks to the row not finish in datagridview , so i press Esc, the control will excute build-in remove row method, but in this
method error.
(Remark) But this question only occur on first row, if more1 row not this error.
(Solve method) And if i exceute step 1 ot 3 , after i add button run BindingSource1.EndEdit(). After execute step 4. No this error, i think the
datagridview already accept the row, but Esc havn't event to remove this row.
I think this is microsoft control event problem. Or you can give some way to solve? Thank you ~~~
Précédent
Suivant
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