I did a search in the forums and in PITS but didn't find any mention of this. However, I have code that worked with Q3 2010, but no longer works with Q1 2011. You can repro this using the code below:
DataSource can be any collection of objects; I was using a three property object collection (evidenced by the column creations) for simplicity. When this RadGridView is attached to a form as a control, it will *not* sort on the title as suggested, using the current assemblies. Reverting to the older Q3 2010 assemblies works however.
Unfortunately I am not able to revert our code back to the old assemblies, as the new assemblies fix several other major bugs present in the Q3 2010 version. Is there a workaround available or a fix planned soon?
EDIT: (I also just put this in as a support issue.)
using System.ComponentModel; using System.Windows.Forms; using Telerik.WinControls.Data; using Telerik.WinControls.UI; namespace PropertyGridExample { public class GridViewFactory { public RadGridView CreateGridView() { // Setup gridview with default options RadGridView gvResults = new RadGridView(); gvResults.Dock = DockStyle.Fill; //gvResults.AllowAutoSizeColumns = true; gvResults.ReadOnly = true; gvResults.Text = "Test"; gvResults.Name = "SearchResults"; gvResults.EnableSorting = true; gvResults.MasterTemplate.EnableSorting = true; // Setup MasterTemplate gvResults.MasterTemplate.AllowAddNewRow = false; gvResults.MasterTemplate.AutoGenerateColumns = false; gvResults.MasterTemplate.Tag = "Test Template"; gvResults.DataSource = null; gvResults.TableElement.BeginUpdate(); gvResults.MasterTemplate.Columns.Clear(); // Setup Columns GridViewTextBoxColumn column = new GridViewTextBoxColumn(); column.Name = "Title"; column.HeaderText = "Title"; column.FieldName = "Title"; column.MinWidth = 50; column.MaxWidth = 250; column.AutoSizeMode = BestFitColumnMode.DisplayedDataCells; gvResults.MasterTemplate.Columns.Add(column); GridViewTextBoxColumn column1 = new GridViewTextBoxColumn(); column1.Name = "Countries"; column1.HeaderText = "Countries"; column1.FieldName = "Countries"; column1.MinWidth = 50; column1.MaxWidth = 250; column1.AutoSizeMode = BestFitColumnMode.DisplayedDataCells; gvResults.MasterTemplate.Columns.Add(column1); GridViewTextBoxColumn column2 = new GridViewTextBoxColumn(); column2.Name = "Sites"; column2.HeaderText = "Sites"; column2.FieldName = "Sites"; column2.MinWidth = 50; column2.MaxWidth = 250; column2.AutoSizeMode = BestFitColumnMode.DisplayedDataCells; gvResults.MasterTemplate.Columns.Add(column2); gvResults.TableElement.EndUpdate(false); // Set the Datasource (Can be any object collection) gvResults.DataSource = DataFactoryClass.GetData(); SortDescriptor descriptor = new SortDescriptor(); descriptor.PropertyName = "Title"; descriptor.Direction = ListSortDirection.Descending; gvResults.SortDescriptors.Add(descriptor); return gvResults; } } } DataSource can be any collection of objects; I was using a three property object collection (evidenced by the column creations) for simplicity. When this RadGridView is attached to a form as a control, it will *not* sort on the title as suggested, using the current assemblies. Reverting to the older Q3 2010 assemblies works however.
Unfortunately I am not able to revert our code back to the old assemblies, as the new assemblies fix several other major bugs present in the Q3 2010 version. Is there a workaround available or a fix planned soon?
EDIT: (I also just put this in as a support issue.)