Private Sub dataGridView1_CellValidating(ByVal sender As Object, ByVal e As DataGridViewCellValidatingEventArgs) Handles Movement_roller_DDataGridView.CellValidating Dim headerText As String = _ Movement_roller_DDataGridView.Columns(e.ColumnIndex).HeaderText ' Abort validation if cell is not in the CompanyName column. If Not headerText.Equals("Κωδικος Roller") Then Return ' Confirm that the cell is not empty. If (String.IsNullOrEmpty(e.FormattedValue.ToString())) Then Movement_roller_DDataGridView.Rows(e.RowIndex).ErrorText = "Ο Κωδικώς Roller δεν μπορεί να είναι κενός" e.Cancel = True End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)