silverlight - SL4 - Binding DataGridTextColumn to a property -


I have a datagroup that has some code in the DataGrid AutoGeneratingColumn event that looks like this: < Pre> if (e.Property.Name.Contains ("MetaData")) {var descCol = New DataGridTextColumn (e.Property); Var bnd = new binding ("description"); Bnd.Mode = BindingMode.TwoWay; DescCol.Binding = BND; E.Column = descCol; E. Columns Header = "description"; Return; }

The column binds in a type metadata in which the string name is description which I would like to display in my datagrid. So far, I am unable to display property properties in my datagreat. I think that the path I am passing in the binding constructor may be wrong, I have also tried "MetaData.Description" and it does not work either.

Can someone install binding on my datagrid text cloud?

change it,

  var bnd = new binding ("description ");   

to

  var bnd = new binding (e.Property.Name);    

Comments