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!

Dataset updates after sorting from a grid

Status
Not open for further replies.

ctdapper

Programmer
Feb 13, 2001
22
0
0
US
I am able to add a new record to the dataset with the following code.
Dim i As Integer
Dim anyRow As DataRow = Me.objpagers.COMM.NewRow
Me.objpagers.COMM.Rows.Add(anyRow)
i = Me.objpagers.COMM.Count
Me.grdCOMM.CurrentRowIndex = i
grboxadd.Visible = True
Call displaycontrols(0)
tboxlastname.Focus()
buttondelete.Visible = False
i = 0
there is a control that updates the dataset on the groupbox.

The problem is if the user sorts by clicking on a column of the grid this code will not work. it does not create a new row. I get the count of the current rows displayed in the grid.
please help it you can.
Dan
dan.paradis@snet.net


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top