sam

sam

  • NA
  • 2
  • 0

How do I refresh a datagrid view?

Aug 16 2006 11:21 AM
I have a bit of a problem with refreshing a datagrid after assigning default values to the columns. The first row always ends up being blank and the actuall rows start of with the second row and down. code is below. thanks, 'validate that all fields have proper input Select Case 0 Case Work_OrderTextBox.Text.Length MsgBox("Please Enter a WO Number") Case Ref_DesignatorTextBox.Text.Length MsgBox("Please enter the Ref Designator") Case Else Select Case -1 Case Assembly_NumberComboBox.SelectedIndex MsgBox("Please Choose an Assembly Number") Case CustomerComboBox.SelectedIndex MsgBox("Please Choose The Customer") Case Tech_NameComboBox.SelectedIndex MsgBox("Please Choose your name") Case DefectComboBox.SelectedIndex MsgBox("Please Choose Defect") Case Else Me.Failure_LogDataGridView.Enabled = True Me.NewBoardDefectTrackerDataSet.Failure_Log.CustomerColumn.DefaultValue = CustomerComboBox.Text Me.NewBoardDefectTrackerDataSet.Failure_Log.Assembly_NumberColumn.DefaultValue = Assembly_NumberComboBox.Text Me.NewBoardDefectTrackerDataSet.Failure_Log.Tech_NameColumn.DefaultValue = Tech_NameComboBox.Text Me.NewBoardDefectTrackerDataSet.Failure_Log.DefectColumn.DefaultValue = DefectComboBox.Text Me.NewBoardDefectTrackerDataSet.Failure_Log.Work_OrderColumn.DefaultValue = Work_OrderTextBox.Text Me.NewBoardDefectTrackerDataSet.Failure_Log.Ref_DesignatorColumn.DefaultValue = Ref_DesignatorTextBox.Text Me.NewBoardDefectTrackerDataSet.Failure_Log.Failure_ModeColumn.DefaultValue = Failure_ModeComboBox.Text Me.NewBoardDefectTrackerDataSet.Failure_Log.DateColumn.DefaultValue = Date.Today Me.Failure_LogDataGridView.Update() End Select End Select