RadNumericTextBox DBvalue and LINQ/SQL

kyle

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.

You have to handle the Updating event handler to change the updated values before the update operation, or to cancel the update operation. The LinqDataSourceUpdateEventArgs object that is passed to event handlers contains both the original object and the updated object.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.