Since I could have varying columns with each request, I am creating the columns for my GridView on the fly, based on the data returned from my service. For the same reason, I am using the ValueConverter to access the data:
for (int i = 0; i < e.Result.ResultTable.Columns.Count; i++)
GridViewDataColumn newcol = new GridViewDataColumn();
newcol.HeaderText = e.Result.ResultTable.Columns[i].ToString();
newcol.IsFilterable = true;
newcol.IsGroupable = true;
newcol.IsSortable = true;
newcol.IsReadOnly = true;
newcol.DataMemberBinding= new System.Windows.Data.Binding();
newcol.DataMemberBinding.Converter = new IndexConverter();
newcol.DataMemberBinding.ConverterParameter = i.ToString(); ;
Data returns fine, column headers are correct, but I can't sort, group or filter the grid. Clicking on a column does nothing, there is no filter indicator, and if I drag a column to the group area, I get a "You can't do that" icon.
Is this somehow related to the ValueConverter?