I have made a RadDataForm "Invoice".
In the "Edit Template" i added a RadGridView "InvoiceDetails", this grid has following columns:
Description, Price, Quantity, Total
The Total column is an Expression Column: Total = Price * Quantity.
Using following code executed in the grid loaded event:
<ExqiOffice.Web.InvoiceDetail, double>> expr = invd => (double)(invd.Price.HasValue == true ? invd.Price : 0.0f) * (double)(invd.Quantity.HasValue ? invd.Quantity : 0.0f);
GridViewExpressionColumn col = ((RadGridView)sender).Columns["Total"] as GridViewExpressionColumn;
col.Expression = expr;
I placed the grid inside a DataFormDataField. When i run the code and open an invoice, the code takes a long time to execute and then returns a generic error message:
An unhandled exception ('Unhandled Error in Silverlight Application
Message: System.ArgumentNullException: [ArgumentNull_Generic]
When i place the grid outside the dataform, the code works perfectly.
Has anyone tried this and found a solution or is this a bug in the RadGridView/RadDataForm combination?