Hi, I am trying to apply custom sorting to a grouping column designed programatically that is binding to the grid as string.
The problem is that I cannot get event fired because for example I do not allow user to sort the columns, It is made programatically and it is fixed by design.
How can I apply a custom sorting method to a grid designed programatically for a grouping column and that it is fixed ??
example:
Column Column
====== ======
4 1
2;33 2
1;35 4
11 5
2 11
1 13
13 1;35
5 2;33
I have been trying to apply this example but I can not get it works, for example events do not fire.
http://www.telerik.com/help/winforms/gridview-sorting-custom-sorting.html
Any help would be appreciated.
The problem is that I cannot get event fired because for example I do not allow user to sort the columns, It is made programatically and it is fixed by design.
How can I apply a custom sorting method to a grid designed programatically for a grouping column and that it is fixed ??
example:
Column Column
====== ======
4 1
2;33 2
1;35 4
11 5
2 11
1 13
13 1;35
5 2;33
I have been trying to apply this example but I can not get it works, for example events do not fire.
http://www.telerik.com/help/winforms/gridview-sorting-custom-sorting.html
Any help would be appreciated.
// // radGrid// this.radGrid.MasterTemplate.AllowSearchRow = true;this.radGrid.MasterTemplate.AutoExpandGroups = true;this.radGrid.MasterTemplate.EnableFiltering = true;this.radGrid.MasterTemplate.MultiSelect = true;this.radGrid.MasterTemplate.ShowFilteringRow = false;this.radGrid.MasterTemplate.ShowHeaderCellButtons = true;this.radGrid.MasterTemplate.HorizontalScrollState = Telerik.WinControls.UI.ScrollState.AlwaysShow;this.radGrid.Name = "radGrid";this.radGrid.ReadOnly = true;this.radGrid.ShowHeaderCellButtons = true;this.radGrid.Size = new System.Drawing.Size(1028, 262);this.radGrid.TabIndex = 5;this.radGrid.Text = "Test Results Browser Grid";this.radGrid.SelectionChanged += new System.EventHandler(this.radGrid_SelectionChanged);this.radGrid.CellClick += new Telerik.WinControls.UI.GridViewCellEventHandler(this.radGrid_CellClick);this.radGrid.ContextMenuOpening += new Telerik.WinControls.UI.ContextMenuOpeningEventHandler(this.radGrid_ContextMenuOpening);this.radGrid.FilterExpressionChanged += new Telerik.WinControls.UI.GridViewFilterExpressionChangedEventHandler(this.radGrid_FilterExpressionChanged);this.radGrid.FilterChanged += new Telerik.WinControls.UI.GridViewCollectionChangedEventHandler(this.radGrid_FilterChanged);this.radGrid.Click += new System.EventHandler(this.radGrid_Click);private void ConfigureRadGridGrouping(){ GroupDescriptor groupByBall = new GroupDescriptor(); groupByBall.GroupNames.Add("Balls", ListSortDirection.Ascending); this.radGrid.EnableCustomGrouping = false; this.radGrid.GroupDescriptors.BeginUpdate(); this.radGrid.GroupDescriptors.Add(groupByBall); this.radGrid.GroupDescriptors.EndUpdate();}private void AsignTitlesToRadGridBrowser(){ /// Telerik foreach (var column in this.radGrid.Columns) { column.HeaderText = string.Empty; column.IsVisible = false; column.VisibleInColumnChooser = false; } this.radGrid.Columns["Reference"].HeaderText = "Reference"; this.radGrid.Columns["Reference"].IsVisible = true; this.radGrid.Columns["Reference"].VisibleInColumnChooser = true; this.radGrid.Columns["Reference"].AllowGroup = true; this.radGrid.Columns["Title"].HeaderText = "Title"; this.radGrid.Columns["Title"].IsVisible = true; this.radGrid.Columns["Title"].VisibleInColumnChooser = true; this.radGrid.Columns["Title"].AllowGroup = true; this.radGrid.Columns["Balls"].HeaderText = "Balls"; this.radGrid.Columns["Balls"].IsVisible = true; this.radGrid.Columns["Balls"].VisibleInColumnChooser = true; this.radGrid.Columns["Balls"].AllowGroup = true;} 