This question is locked. New answers and comments are not allowed.
hi,
this is ok in version 924 ,the code as follows:
upgraded q3, throw exception message:
Unable to cast object of type 'Telerik.Windows.Controls.GridView.ColumnGroupDescriptor' to type 'Telerik.Windows.Data.GroupDescriptor'.
since 924 is ok.
we have other code for it. load GroupDescriptor for save data.
then so to do.. add descriptor to datagrid
OK, SelectedDataGrid.GroupDescriptors.Count() > 0
if changed code use ColumnGroupDescriptor :
throw exception message:
Unable to cast object of type 'Telerik.Windows.Data.GroupDescriptor' to type 'Telerik.Windows.Controls.GridView.ColumnGroupDescriptor'.
why ? both Telerik.Windows.Data.GroupDescriptor and Telerik.Windows.Controls.GridView.ColumnGroupDescriptor did not foreach?
any question?
thanks
this is ok in version 924 ,the code as follows:
List<string> groupColumns = new List<string>(); foreach (GroupDescriptor group in dataGrid.GroupDescriptors) { if (!string.IsNullOrEmpty(columnaList)) { columnaList += "," + group.Member; } else { columnaList += group.Member; } groupColumns.Add(group.Member); }upgraded q3, throw exception message:
Unable to cast object of type 'Telerik.Windows.Controls.GridView.ColumnGroupDescriptor' to type 'Telerik.Windows.Data.GroupDescriptor'.
since 924 is ok.
Do not understand
we have other code for it. load GroupDescriptor for save data.
GroupDescriptor descriptor = new GroupDescriptor(); if (pair.Key == "SecID") { CountFunction countFunction = new CountFunction { Caption = "Count:" }; holdingColumn.FooterTextAlignment = TextAlignment.Left; holdingColumn.AggregateFunctions.Add(countFunction); descriptor.AggregateFunctions.Add(countFunction); }then so to do.. add descriptor to datagrid
if (groupByData.ContainsKey(SelectedTabIndexer)) { if (groupByData[SelectedTabIndexer].Contains(columnName)) { descriptor.Member = columnName; descriptor.DisplayContent = displaycontent; SelectedDataGrid.GroupDescriptors.Add(descriptor); } }OK, SelectedDataGrid.GroupDescriptors.Count() > 0
if changed code use ColumnGroupDescriptor :
foreach (ColumnGroupDescriptor group in dataGrid.GroupDescriptors){ if (!string.IsNullOrEmpty(columnaList)) { columnaList += "," + group.Column.UniqueName; } else { columnaList += group.Column.UniqueName; } groupColumns.Add(group.Column.UniqueName);}throw exception message:
Unable to cast object of type 'Telerik.Windows.Data.GroupDescriptor' to type 'Telerik.Windows.Controls.GridView.ColumnGroupDescriptor'.
why ? both Telerik.Windows.Data.GroupDescriptor and Telerik.Windows.Controls.GridView.ColumnGroupDescriptor did not foreach?
any question?
thanks