Hi
I am having a issue where I get the data from SQL server database table using LLBLGen and then bind it to Infragistic grid (winforms) using below code.
UltraGrid1.DataSource = oEntityCollection
UltraGrid1.DataBind()
This will show me all the rows from table (my table has around 1000 rows).
Now in CustomerName column in the grid shows CustomerName in each row and I want to make one of the CustomerName column's cell value to NULL or blank string, If i remove the data in the cell to make it BLANK or NULL then I click the SAVE button and i get below error.
I am using below code to save the data back to database.
If oEntityCollection.SaveMulti(True) > 0 Then
Messagebox.Show "data saved"
End If
I am not sure why I am getting this error. It is working fine with DataGrid that comes with VS.NET 2003.
Please help me to solve this issue.
---------------------------
ERROR
---------------------------
Unable to update the data value: Object type cannot be converted to target type.
System.ArgumentException: Object type cannot be converted to target type.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Reflection.MethodInfo.Invoke(Object obj, Object[] parameters)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at SD.LLBLGen.Pro.ORMSupportClasses.EntityPropertyDescriptor.SetValue(Object component, Object value)
at Infragistics.Win.UltraWinGrid.UltraGridRow.SetCellValue(UltraGridColumn column, Object val, Boolean suppressErrorMessagePrompt)
at Infragistics.Win.UltraWinGrid.UltraGridCell.SetValue(Object value, Boolean suppressErrorMessagePrompt)
at Infragistics.Win.UltraWinGrid.UltraGridCell.set_Value(Object value)
at Infragistics.Win.UltraWinGrid.UltraGridCell.CommitEditValue(Boolean& stayInEdit, Boolean fireDataError, Boolean forceDontThrowException)
Infragistics.Win.UltraWinGrid.UltraGridCell
---------------------------
OK
---------------------------