This is a migrated thread and some comments may be shown as answers.

CalculatedColumn and BinaryImageColumn can't coexist in same RadGrid

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 14 Aug 2012, 03:07 AM
Hello,

I don't know if this is a bug, so I thought I'd report it:

I have a RadGrid that shows details of Human Resources. In addition to things like a First Name and Last Name field, I also have a VarBinary(MAX) field that I use to store the employee's Picture. The field is simply called "Picture". 

The data is shown in a RadGrid, including the employee's picture in a BinaryImage Column. This works just fine when you run the form.

However, let's say I want to display ONE column with the employee's full name. I add a calculated field to the grid that concatenates the first, middle and last names. I then make the columns with the first, middle and last names invisible. Then I try to run the form.

I get this error:

'Dynamicclass1' does not contain a property with the name 'Picture'

This error will continue to recur until you either:
  • Remove the Calculated Column OR;
  • Remove the BinaryImage Column

Even if you take out the BinaryImage column and replace it with a TemplateColumn that uses a BinaryImage in its ItemTemplate, you'll get the same error.

I even tried creating a new Telerik Web Application from scratch, adding a declarative RadGrid, with both a Calculated Column and a BinaryImage column with NO CODE attached to the form, and the same error occurs.

I'm using Telerik RadControls for AJAX version 2012.2.724.40 (2012 Q2 SP1).  I've repeated this experiment with previous builds of RadControls for AJAX and I'm seeing the same manifestation in previous, older projects. Can anyone reproduce this error? Can anyone confirm if this is indeed a bug?

Regards,
Jonathan

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 16 Aug 2012, 11:34 AM
Hi Jonathan,

I am logging in our tracking system and our developers will look into it. In the meantime, you can work around it by setting EnableLinqExpressions to false in the RadGrid. See the example bellow:
<telerik:RadGrid ID="RadGrid1" EnableLinqExpressions="false" runat="server" CellSpacing="0" DataSourceID="SqlDataSource2"
        GridLines="None">

Greetings,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or