Nessun overload del metodo "To String" accetta argomenti -1
Ho tentato cosi:
MessageBox.Show(Convert.ToDateTime(selectedRow.Cells["DATA"]).ToString("dd/MM/yyyy"));
Non da errori durante la scrittura ma quando lancio l'esecuzione:
System.InvalidCastException non è stata gestita
HResult=-2147467262
Message=Unable to cast object of type 'System.Windows.Forms.DataGridViewTextBoxCell' to type 'System.IConvertible'.
|