We have a int field in a database table which can be null. We are using LINQ/SQL. The tables dataContext is pointing to the linq/dbml and is tied to a linqDataSource for our RadGrid.
When doing addnew or edit, we can bind(int field) to the RadNumericTextBox.dbvalue just fine. But the issue is on save!
The dbvalue field allows the RadNumericTextBox to handle the null, but causes an issue when saving the value to linq because DBvalue is of type 'object' not int.
the error when update/saving is:
Failed to set one or more properties on type BillMaster.DAL.PaymentGateway. Ensure that the input values are valid and can be converted to the corresponding property types.
How can we resolve this?
When doing addnew or edit, we can bind(int field) to the RadNumericTextBox.dbvalue just fine. But the issue is on save!
The dbvalue field allows the RadNumericTextBox to handle the null, but causes an issue when saving the value to linq because DBvalue is of type 'object' not int.
the error when update/saving is:
Failed to set one or more properties on type BillMaster.DAL.PaymentGateway. Ensure that the input values are valid and can be converted to the corresponding property types.
How can we resolve this?