General information
Category:
Coding, syntax and commands
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 ~~~
Previous
Next
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