in windows application using vb.net i hve datagridview binded with data from database
the db table has columns for date with datatype datetime
when the application is executed and the grid receives focus i get a popup msg window with error
DataGridView Default Error Dialog
---------------------------
The following exception occurred in the DataGridView:
System.FormatException: String was not recognized as a valid DateTime. ---> System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider)
--- End of inner exception stack trace ---
at System.Windows.Forms.Formatter.InvokeStringParseMe thod(Object value, Type targetType, IFormatProvider formatInfo)
at System.Windows.Forms.Formatter.ParseObjectInternal (Object value, Type targetType, Type sourceType, TypeConverter targetConverter, TypeConverter sourceConverter, IFormatProvider formatInfo, Object formattedNullValue)
at System.Windows.Forms.Formatter.ParseObject(Object value, Type targetType, Type sourceType, TypeConverter targetConverter, TypeConverter sourceConverter, IFormatProvider formatInfo, Object formattedNullValue, Object dataSourceNullValue)
at System.Windows.Forms.DataGridViewCell.ParseFormatt edValueInternal(Type valueType, Object formattedValue, DataGridViewCellStyle cellStyle, TypeConverter formattedValueTypeConverter, TypeConverter valueTypeConverter)
at System.Windows.Forms.DataGridViewCell.ParseFormatt edValue(Object formattedValue, DataGridViewCellStyle cellStyle, TypeConverter formattedValueTypeConverter, TypeConverter valueTypeConverter)
at System.Windows.Forms.DataGridView.PushFormattedVal ue(DataGridViewCell& dataGridViewCurrentCell, Object formattedValue, Exception& exception)
To replace this default dialog please handle the DataError event.
---------------------------
OK
how do i resolve it