All works fine every single line of code there's nothing wrong except one logical thing.
When the form loads the Row Validating automatically fires because I have a function that Selects the table from the Database and it fills the Data Set by then attaching it to the datasourse of the "dgv Tarifa" table.
This article is going to explain how to add custom error validation into the cell directly rather than displaying the message into a popup window.
It is very useful for the end user to have the exact location of the error in order to take immediate action.
Ok, so the snippet I pointed you too does exactly that. NET to query the contents of an Excel file (displays the worksheets in a combo) and upon selection of a worksheet will show the contents in a Data Grid View. Ole Db Partial Public Class Form1 Inherits Form Public Sub New() Initialize Component() End Sub Private Sub open File Button_Click(sender As Object, e As Event Args) Handles open File Button. Interop Services Public Class Form2 Friend xl App As New Excel. Worksheet Friend ch As String Friend Excel Sheet Name As Object Friend ex WS2 As Microsoft. Thanks that really worked out for me beside the function I had to put several True/False boolean values in other subs/events aswell to prevent the Row Validating and in fact switched back to Cell Validated.
It is not what I would call elegant but sometimes you have to get it done.
Select Command = cmd1 ' Data Adapter(da) command selection is cmd2, which means selects all cells from the specific table declared above throughout SQL Connection "conn". Fill(ds, "SMDR_Tariff") 'Data Adapter(da) fills, adds or refreshes cells or rows in the Data Set(ds).