0

I am using this to define dynamic query IQueryable and set the result as itemssource of wpf datagrid. I get this error in output window:

System.Windows.Data Error: 40 : BindingExpression path error: 'DynamicProp1' property not found on 'object' ''DynamicType1' ....

when I try it with dynamic keyword I get success.

dynamic d = item;
var v = d.DynamicProp1;//works
Community
  • 1
  • 1
mordechai
  • 829
  • 1
  • 7
  • 23

1 Answers1

0

On dynamic you always set properties, the code in that other question seemed to define fields, which cannot be bound.

(Use TypeBuilder.DefineProperty instead of DefineField)

H.B.
  • 166,899
  • 29
  • 327
  • 400