add a new time it does not duplicate?

johnjake2000

New member
Joined
Jun 22, 2011
Messages
1
Programming Experience
1-3
I have two datagridview one that is DgridTemp or Unbound and the other one is BIND DridBind.... my program goes like this ADD Rows to DgridTemp Time In... then save to DridBind Time Out.. now for my Time_ID = DridBind.RowsCount + 1 everytime I add a new Time... my problem is everytime I add to DridTemp the Time_ID is duplicating since it counts only the rows in DridBind how do i do it that everytime i add a new time it does not duplicate...

DridTemp
Time_ID
TI-00-3
TI-00-3


DridBind
Time_ID
TI-00-1
TI-00-2


I want to do it with
DridTemp
TI-00-3
TI-00-4
and so on everytime I add...

PLS HELP
Dim DgridTemp = New DataGridView
        If DgridTemp.RowCount = 0 And DgridTemp.ColumnCount = 0 Then
            Populate_Add_Order()
            Populate_ID_Order()
            ID = Trim(cmbOrderID.Text) + "-" + (lblNewID_Order.Text)
            cmbOrderID.Text = ID
        Else                                                                              <<<------------------------------------- the next time I add this wont execute 
            If DgridTemp.Rows(i).Cells(0).Value = Order_TemID2 Then
                Populate_Add_Order()
                Populate_ID_Order()
                lblNewID_Order.Text = lblNewID_Order.Text + 1
                ID = Trim(cmbOrderID.Text) + "-" + Trim(lblNewID_Order.Text)
                cmbOrderID.Text = ID
            End If


        End If
 
Back
Top