problem moving to new row
From: Mike Read (mike.read.spam.no_at_allwaresolutions.com)
Date: 03/23/05
- Next message: flat_ross: "Lock/Stop/Restrict entry when combo box is bound."
- Previous message: Erwin Pant via DotNetMonster.com: "Re: Datagrids - Rows???"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Mar 2005 11:23:00 -0500
I have a form with several textboxes, checkboxes and datetime boxes on it.
I am databinding all these controls to a typed dataset.
I need to be able to addnew record, and navigate the records with
next,prev,first and last buttons.
i am adding new record using bindingcontext('dataset.table').addnew (i am
fixed the problem with the checkbox's). This works fine, i get the next
record addeded.
i am moving to the next record by using
bindingcontext('dataset.table').position +=1
i am moving to the previous record by using
bindingcontext('dataset.table').position -= 1
I call endcurrentedit before each position change.
Here is my problem, if i load my dataset with data on initial load, i can
move backwards, forwards as much as i like and everything works great. If i
add a new record, the record is added and the position is set to the new
record. Now if i hit the previous button it moves backwards one record no
problem, but then if i hit next button it does nothing, but if i hit the
next button again it moves to my new record.
It will move backwards as much as i want, the problem occurs when it moves
from the original records to the first new record. To move from last
original to first new you must hit the next button twice. But you can move
forward through as many original or if you have multiple new rows you can
move through these rows no problem, it is just that move from last original
to first new that requires 2 clicks on the next button
Thank you
Mike
- Next message: flat_ross: "Lock/Stop/Restrict entry when combo box is bound."
- Previous message: Erwin Pant via DotNetMonster.com: "Re: Datagrids - Rows???"
- Messages sorted by: [ date ] [ thread ]