Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

End of a Dataset

Status
Not open for further replies.

wadewilson1

Programmer
Sep 10, 2002
23
0
0
US
I feel realy stupid right now but here it goes.

How can I check if a dataset's table current row is the last row? I'm trying to create a application that will allow the user to navigate a datagrid but only allow edits in text boxes. Right now, when the user clicks on the last row in the datagrid/dataset table, it throws an error.

I want to be able to prompt the user if it is the last row, "do you want to add new?"

Help,
wadewilson1
 
What about adding an condition that says if the current row is Ds.Tables(0).Rows.Count then "add new row".

So if the count is 50 (0-49) and the current row is 51 (1-50), then you would ask to add a new row.

------
 
Thanks for the help, that worked great. My brain just wasn't functioning straight.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top