Workaround: Inherit the GridViewSearchRowInfo and override the SelectNextSearchResult method class MyGridViewSearchRowInfo : GridViewSearchRowInfo { private GridViewInfo gridViewInfo; private RadGridView radGridView; public MyGridViewSearchRowInfo(GridViewInfo gridViewInfo, RadGridView radGridView) : base(gridViewInfo) { this.radGridView = radGridView; } public override Type RowElementType { get { return typeof(GridSearchRowElement); } } public override void SelectNextSearchResult() { if (this.radGridView != null) { this.radGridView.ElementTree.Control.Invoke(() => { base.SelectNextSearchResult(); }); } } }
To reproduce: - Add textbox and checkbox columns to a grid the checkbox column should not be visible without scrolling to the right. - Change the data source in the FilterChanged event. - Test this by moving the checkbox column in front of the text box column.
To reproduce: 1. Add a UserControl and drop a RadGridView in it. 2. Use the following code: public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition(); this.radGridView1.ViewDefinition = view; view.ColumnGroups.Add(new GridViewColumnGroup("Group")); view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow() ); GridViewTextBoxColumn col = new GridViewTextBoxColumn("Col1"); this.radGridView1.Columns.Add(col); view.ColumnGroups[0].Rows[0].ColumnNames.Add("Col1"); } } 3. Drag the UserControl from the Toolbox to the form. Workaround: set the ViewDefinition property after all columns are added.
Workaround: check the attached project
To reproduce: - Assing context menu using one of the default properties.
Introduce a property to change symbol used to separate summaryItems in SummaryRowGroupHeaders.
To reproduce: GridViewHyperlinkColumn col = new GridViewHyperlinkColumn(); col.FieldName = "Name"; col.HyperlinkOpenAction = HyperlinkOpenAction.DoubleClick; Workaround: Use the CellDoubleClick event: void radGridView1_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (e.Column is GridViewHyperlinkColumn) { string hyperlink = e.Value.ToString(); } }
To reproduce - Add condition formatting object that changes the font. - Add cell style that changes the background only. Workaraound: Use the CellFormatting event instead of a style.
For now you can manually add the columns to the ExcelFilteredColumns collection when the filters are added in code: FilterDescriptor fd = new FilterDescriptor("Value", Telerik.WinControls.Data.FilterOperator.IsEqualTo, "B"); fd.IsFilterEditor = true; radGridView1.FilterDescriptors.Add(fd); this.radGridView1.MasterTemplate.ExcelFilteredColumns.Add( this.radGridView1.Columns[0] );
How to reproduce: Public Class Form1 Sub New() InitializeComponent() Dim col As New GridViewTextBoxColumn("Column1") Me.RadGridView1.Columns.Add(col) End Sub Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click Dim sw As New Stopwatch sw.Start() Me.RadGridView1.Rows.Clear() Me.RadGridView1.BeginUpdate() Dim RowInfo For ii = 1 To 100000 RowInfo = Me.RadGridView1.Rows.AddNew RowInfo.Cells("Column1").Value = ii Next Me.RadGridView1.EndUpdate() sw.Stop() Console.WriteLine("Elapsed: " & sw.Elapsed.TotalSeconds) End Sub End Class Workaround: add data to a collection and use bound mode
1 .Add RadgridView to Form 2. Set "AllowSearchRow" property to True 3. Add a row and place the word "Gießen" (name of a city) in a column 4. When the program is running type "Giessen" in the AutoSearch Row. After the "n" an ArgumentException is thrown.
To reproduce: public Form1() { InitializeComponent(); List<Item> items = new List<Item>(); items.Add(new Item(1,"sample")); items.Add(new Item(2, null)); items.Add(new Item(3, "sample2")); this.radGridView1.DataSource = items; this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; this.radGridView1.EnableFiltering = true; this.radGridView1.ShowFilteringRow = false; this.radGridView1.ShowHeaderCellButtons = true; } public class Item { public int Id { get; set; } public string Description { get; set; } public Item(int id, string description) { this.Id = id; this.Description = description; } } Workaround: If possible, instead of using null value, use empty string. If not possible, you will have to employ 3 classes - MyFilterMenuTreeElement, MyFilterMenuTreeItem, MyListFilterPopup. The classes are provided in the attached project RadGridViewFiltering.zip. Once you add the classes to your project, all you have to do is to replace the default popup with the new one, in the FilterPopupRequired handler: private void RadGridView1_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e) { if (e.FilterPopup is RadListFilterPopup) { e.FilterPopup = new MyListFilterPopup(e.Column); } } The approach is also demonstrated in the attached project.
Workaround: public Form1() { InitializeComponent(); this.radGridView1.TableElement.VScrollBar.ValueChanged += VScrollBar_ValueChanged; } private void VScrollBar_ValueChanged(object sender, EventArgs e) { int maxValue = this.radGridView1.TableElement.VScrollBar.Maximum - this.radGridView1.TableElement.VScrollBar.LargeChange; if (maxValue < 0) { this.radGridView1.TableElement.VScrollBar.Value = 0; } else if (this.radGridView1.TableElement.VScrollBar.Value > maxValue) { this.radGridView1.TableElement.VScrollBar.Value = maxValue; } }
To reproduce: - Set the first column header text to "+R/S"; - Export the grid with spread export. Workaround: class MySpreadExportRenderer : SpreadExportRenderer { public override void SetCellSelectionValue(string text) { if (text == "+R/S") { var cellSelection = typeof(SpreadExportRenderer).GetField("cellSelection", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as CellSelection; CellRange range = cellSelection.CellRanges.ElementAtOrDefault(0); CellValueFormat cvf = new CellValueFormat("@"); var worksheet = typeof(SpreadExportRenderer).GetField("worksheet", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as Worksheet; worksheet.Cells[range.FromIndex.RowIndex, range.FromIndex.ColumnIndex].SetFormat(cvf); } base.SetCellSelectionValue(text); } }
To reproduce: 1. Add a RadGridView and a RadButton. 2. Use the following code snippet: Public Class Form1 Private myList As New List(Of MyObject) Sub New() InitializeComponent() PopulateGrid(300) End Sub Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click PopulateGrid(100) End Sub Private Sub PopulateGrid(count As Integer) myList.Clear() Me.RadGridView1.DataSource = Nothing For index = 1 To count myList.Add(New MyObject(index, "Item" & index)) Next Me.RadGridView1.DataSource = myList End Sub Public Class MyObject Public Sub New(ByVal myInt As Integer, ByVal myString As String) _myInt = myInt _myString = myString End Sub Private _myInt As Integer Public Property MyInt() As Integer Get Return _myInt End Get Set(ByVal value As Integer) _myInt = value End Set End Property Private _myString As String Public Property MyString() As String Get Return _myString End Get Set(ByVal value As String) _myString = value End Set End Property End Class End Class 3. Select the last item 4. Click the button Workaround: use BindingList instead of List
To reproduce: 1. Drag a grid from the Toolbox and drop it onto the form 2. Open the designer 3. Set the RadGridView.AutoGenerateHierarchy property to true. 4. Open the smart tag and set the DataSource property. As a result the grid templates and relations will be created. 5. Try to open the Property Builder. It opens successfully. 6. Close the Property Builder and add a new templated from the smart tag. 7. If you try to open the Property Builder again you will obtain the error. Please refer o the attached gif file illustrating the behavior. Workaround: set the AutoGenerateHierarchy to false in order to open the Property Builder.
To reproduce: - Group the grid first. Make sure there are enough rows for two pages. - Set the AutoSizeRows property to true. Workaround: Set AutoSizeRows to false while printing.
Changing the DataSource or scrolling are slow. Create a grid with more than 20 columns and add 5K rows for example. Maximize the form and try to scroll with mouse wheel. You will notice that the scrolling performance is worse compared to the normal state of the form with less visible visual elements. Workaround: this.radGridView1.EnableFastScrolling = true; and use the scrollbar's thumb Second workaround: use paging: https://docs.telerik.com/devtools/winforms/gridview/paging/overview Thus, you will display as many rows as possible to display on the screen per page. Instead of scrolling, you will navigate through pages.