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

[Solved] Indexed properties in DataMemberBinding

1 Answer 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jason Shaver
Top achievements
Rank 1
Jason Shaver asked on 21 Oct 2009, 08:49 PM
In the Silverlight 3 DataGrid, I have some code like this:

    for (int x = 0; x < ThisForecast.PeriodNames.Count; x++)
   {
      var TextColumn = new DataGridTextColumn();
      TextColumn.Header = ThisForecast.PeriodNames[x];
      TextColumn.Binding = new Binding(String.Format("Periods[{0}].Quantity", x));
      TextColumn.Binding.Converter = Resources["CountConverter"] as IValueConverter;
      TextColumn.Binding.Mode = BindingMode.TwoWay;
      TextColumn.IsReadOnly = false;
      dgItemForecast.Columns.Add(TextColumn);
   }

Now, in trying the Q3 beta, I have code like this:

 

 

   for (int x = 0; x < ThisForecast.PeriodNames.Count; x++)
   {
      var TextColumn = new GridViewDataColumn();
      TextColumn.Header = ThisForecast.PeriodNames[x];
      TextColumn.DataMemberBinding = new Binding(String.Format("Periods[{0}].Quantity", x));
      TextColumn.DataMemberBinding.Converter = Resources["CountConverter"] as IValueConverter;
      TextColumn.DataMemberBinding.Mode = BindingMode.TwoWay;
      TextColumn.IsReadOnly = false;
      dgItemForecast.Columns.Add(TextColumn);
   } 


And the GridView does not seem to be able to handle it.  Is there a way to do this functionality in the Telerik controls?

1 Answer, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 23 Oct 2009, 10:43 AM
Hello Jason,

Thanks for reporting this problem. We are already aware of it and have fixed. The fix will be available in the latest internal build that targets the Q3 release.

Best wishes,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Jason Shaver
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or