Completed
Last Updated: 27 May 2015 13:18 by Ruth Goldberg
To reproduce:
-add a RadGridView and bind it to Northwind.Customers datatable.
-try to edit a random row and change its CustomerID cell to an already existing one.

Workaround: use custom GridViewDataRowInfo:

public class CustomRowInfo : GridViewDataRowInfo
{
    public CustomRowInfo(GridViewInfo viewInfo) : base(viewInfo)
    {
    }

    protected override bool OnEndEdit()
    {
        IEditableObject dataItem = this.DataBoundItem as IEditableObject;
        if (dataItem != null)
        {
            try
            {
                dataItem.EndEdit();
            }
            catch (Exception ex)
            {
                this.ViewTemplate.SetError(new GridViewCellCancelEventArgs(null,null, null), ex);
            }
        }
    
        return base.OnEndEdit();
    }
}
Completed
Last Updated: 11 Nov 2015 10:00 by ADMIN
Workaround:

public Form1()
{
    InitializeComponent();
    radGridView1.CreateCell += radGridView1_CreateCell;
}
 
private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
    if (e.CellType == typeof(GridDataCellElement))
    {
        e.CellElement = new CustomDataCell(e.Column,e.Row);
    }
}
 
public class CustomDataCell : GridDataCellElement
{
    public CustomDataCell(GridViewColumn column, GridRowElement row) : base(column, row)
    {
    }
 
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridDataCellElement);
        }
    }
 
    protected override void OnMouseDown(MouseEventArgs e)
    {
        if (e.Button == MouseButtons.Left &&
            this.AllowRowReorder &&
            this.ViewTemplate.AllowRowReorder &&
            Cursor.Current != Cursors.SizeNS)
        {
            base.OnMouseDown(e);
        }
    }
}
Completed
Last Updated: 20 Feb 2014 15:13 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
To reproduce:
- add RadGridView and use the following code:

public Form1()
{
    InitializeComponent();

    DataTable source = new DataTable();
    string colName = string.Empty;

    for (var i = 0; i < 10; i++)
    {
        colName = "col" + i.ToString();

        this.Grid.Columns.Add(new GridViewTextBoxColumn(colName));
        source.Columns.Add(new DataColumn(colName));
    }

    this.Grid.DataSource = source;
}

- Run the project, click over the grid and press PageUp key. As a result NullReferenceException is thrown.

Workaround: use custom BaseGridBehavior:

this.radGridView1.GridBehavior = new CustomGridBehavior();

public class CustomGridBehavior : BaseGridBehavior
{
    protected override bool ProcessPageUpKey(KeyEventArgs keys)
    {
        GridTableElement tableElement = (GridTableElement)this.GridViewElement.CurrentView;
        GridViewRowInfo firstScrollableRow = GetFirstScrollableRow(tableElement, true);
        RadScrollBarElement scrollBar = tableElement.VScrollBar;
        if (this.GridViewElement.CurrentRow == firstScrollableRow && firstScrollableRow!=null)
        {
            int height = (int)tableElement.RowScroller.ElementProvider.GetElementSize(firstScrollableRow).Height;
            int newValue = scrollBar.Value - scrollBar.LargeChange + height + tableElement.RowScroller.ScrollOffset;
            scrollBar.Value = Math.Max(newValue, scrollBar.Minimum);
            tableElement.UpdateLayout();
            firstScrollableRow = GetFirstScrollableRow(tableElement, false);
        }

        this.GridViewElement.Navigator.SelectRow(firstScrollableRow);
        this.NavigateToPage(firstScrollableRow, keys.KeyData);
        return true;
    }
}
Completed
Last Updated: 28 Feb 2014 11:53 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
To reproduce:
- add a RadGridView with one column - GridViewMultiComboBoxColumn;
- set DataSource property of the column;
- subscribe to the CellValidating and use the following code:

 private void radGridView1_CellValidating(object sender, CellValidatingEventArgs e)
        {
            e.Cancel = true;
        }

Run the application and select a value from the GridViewMultiComboBoxColumn. When pressing Enter key, InvalidCastException is thrown.

Workaround: 

radGridView1.EditorManager.CloseEditorWhenValidationFails = true;
Completed
Last Updated: 17 Nov 2015 16:26 by ADMIN
To reproduce:
Add a TabControl and two tabs. In the second tab add a RadGridView and in the Load event of the form set the SplitMode property of the grid. You will notice that it will not have effect until grouping or other similar action has been performed.

Workaround:
private void Form1_Load(object sender, EventArgs e)
{
    DataTable dt = new DataTable();
    dt.Columns.Add("column1");
    dt.Columns.Add("column2");

    RadGridView1.DataSource = dt;

    this.RadGridView1.VisibleChanged += Visible_Changed;

}

private void Visible_Changed(object sender, EventArgs e)
{
    if (this.RadGridView1.Visible & !this.RadGridView1.SplitMode.Equals(Telerik.WinControls.UI.RadGridViewSplitMode.Horizontal)) {
        RadGridView1.SplitMode = Telerik.WinControls.UI.RadGridViewSplitMode.Horizontal;
    }
}
Completed
Last Updated: 17 Nov 2015 16:26 by Aldo
ADMIN
Created by: Georgi I. Georgiev
Comments: 1
Category: GridView
Type: Bug Report
1
To reproduce:
Add a RadGridView and use the following code to populate it:
for (int i = 0; i < 15; i++)
{
    this.grid.Columns.Add(string.Format("Column {0}", i));
}

for (int i = 0; i < this.grid.Columns.Count * 15; i++)
{
    this.grid.Rows.AddNew();
}t
Set the theme to TelerikMetroTouch.
Scroll somewhere below the middle leave the scrollbar and leave the grid with the mouse. You will notice that the value of the scrollbar will change.

Workaround:
Subscribe to the RadPropertyChanging event of the TableElement:
RadGridView1.TableElement.RadPropertyChanging += Property_Changing;

void TableElement_RadPropertyChanging(object sender, RadPropertyChangingEventArgs args)
{
    args.Cancel = args.Property == GridTableElement.RowHeightProperty ||
                    args.Property == GridTableElement.TableHeaderHeightProperty ||
                    args.Property == GridTableElement.GroupHeaderHeightProperty ||
                    args.Property == GridTableElement.FilterRowHeightProperty;
}

Completed
Last Updated: 01 Oct 2014 08:02 by ADMIN
Extend the cell elements with a button(s) (via decorator for example) which will be visible without putting the grid in edit mode. The buttons should not be visible by default and their visibility will be controlled via property of the column. These buttons can be RadButtonElements which will not hurt the performance. Their purpose will be to inform the end user that some cell is a combo or a date time cell without having to open its editor in advance. When the button is clicked, the corresponding action should be executed e.g. for combo cell, open the editor and show the popup; for spin cell open the editor and perform the click of the desired button. Same goes for the rest of the editors - mccb, color, browse, date time, etc.
Unplanned
Last Updated: 15 Aug 2017 09:41 by ADMIN
There should be a way to fix the width of certain columns. Their width should remain the same while resizing the grid.
Completed
Last Updated: 31 Mar 2014 10:11 by ADMIN
To reproduce: 
1. Add RadGridView with 3 columns and add summary row 
2. When is fired the ViewCellFormatting event, set the Text property of GridSummaryCellElement 
3. Run project and text is not visible. 

void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { GridSummaryCellElement summaryCell = e.CellElement as GridSummaryCellElement; if (summaryCell != null) { if (summaryCell.ColumnInfo.FieldName == "ProductID") { summaryCell.Text = "Total"; } } }

Workaround: 
Set FormatString property instead Text 
property void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { GridSummaryCellElement summaryCell = e.CellElement as GridSummaryCellElement; if (summaryCell != null) { if (summaryCell.ColumnInfo.FieldName == "ProductID") { summaryCell.FormatString = "Total"; } } }
Completed
Last Updated: 15 Sep 2015 06:42 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
To reproduce: 
-add a RadGridView and a RadButton; 
Use the following code: 
public Form1() { InitializeComponent(); List<Item> list = new List<Item>() { new Item(1, "<AUD#F-DC>") }; radGridView1.DataSource = list; } public class Item { public int ID { get; set; } public string Title { get; set; } public Item(int iD, string title) { this.ID = iD; this.Title = title; } } private void Form1_Load(object sender, EventArgs e) { this.employeesTableAdapter.Fill(this.nwindDataSet.Employees); } private void radButton1_Click(object sender, EventArgs e) { ExportToPDF pdfExporter = new ExportToPDF(this.radGridView1); pdfExporter.PdfExportSettings.Title = "My PDF Title"; pdfExporter.PdfExportSettings.PageWidth = 297; pdfExporter.PdfExportSettings.PageHeight = 210; pdfExporter.PageTitle = "temp"; pdfExporter.FitToPageWidth = true; pdfExporter.SummariesExportOption = SummariesOption.ExportAll; pdfExporter.ExportVisualSettings = true; try { pdfExporter.RunExport(@"..\..\..\pdfExport.pdf"); } catch (IOException ex) { RadMessageBox.Show(this, ex.Message, "I/O Error", MessageBoxButtons.OK, RadMessageIcon.Error); } }

Workaround: 
pdfExporter.HTMLCellFormatting += pdfExporter_HTMLCellFormatting; 
private void pdfExporter_HTMLCellFormatting(object sender, HTMLCellFormattingEventArgs e) { string val = e.HTMLCellElement.Value; e.HTMLCellElement.Value = val.Replace("<", "&lt;").Replace(">", "&gt;"); }
Completed
Last Updated: 31 Mar 2014 09:22 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
To reproduce: -add a RadGridView and a RadButton; use the following code: public Form1() { InitializeComponent(); //Create a child template GridViewTemplate childTemplate = new GridViewTemplate(); childTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; this.radGridView1.Templates.Add(childTemplate); GridViewRelation relation = new GridViewRelation(); relation.ChildTemplate = childTemplate; relation.ParentTemplate = this.radGridView1.MasterTemplate; relation.ChildColumnNames.Add("B1"); relation.ParentColumnNames.Add("A1"); this.radGridView1.Relations.Add(relation); } private DataTable dtParent; private DataTable dtChild; private void Form1_Load(object sender, EventArgs e) { //Add data dtParent = new DataTable(); dtParent.Columns.AddRange(new DataColumn[] { new DataColumn("A1") }); dtChild = new DataTable(); dtChild.Columns.AddRange(new DataColumn[] { new DataColumn("B1"), new DataColumn("B2") }); DataRow dr = dtParent.NewRow(); dr["A1"] = "0"; dtParent.Rows.Add(dr); for (int i = 0; i < 40; i++) { DataRow drChild = dtChild.NewRow(); drChild["B1"] = "0"; drChild["B2"] = ""; dtChild.Rows.Add(drChild); } this.radGridView1.MasterTemplate.DataSource = dtParent; this.radGridView1.Templates[0].DataSource = dtChild; } private void radButton1_Click(object sender, EventArgs e) { DataRow drNew = this.dtChild.NewRow(); drNew["B1"] = "0"; drNew["B2"] = "New"; this.dtChild.Rows.Add(drNew); } 

If you expand the first parent row and scroll down to the last child row, clicking over the button does not refresh the vertical scroll-bar correctly. The new row shows only half. You can not scroll to the end. 

Workaround: refresh the vertical scroll-bar manually: private void radButton1_Click(object sender, EventArgs e) { DataRow drNew = this.dtChild.NewRow(); drNew["B1"] = "0"; drNew["B2"] = "New"; this.dtChild.Rows.Add(drNew); int val = radGridView1.TableElement.VScrollBar.Value; foreach (GridViewRowInfo row in radGridView1.Rows) { if (row.IsExpanded) { val = radGridView1.TableElement.VScrollBar.Value; row.IsExpanded = false; row.IsExpanded = true; radGridView1.TableElement.VScrollBar.Value = val; } } } 
Declined
Last Updated: 20 Mar 2014 07:21 by ADMIN
To reproduce:

Add a RadGridView and bind it to a DataTable.

Subscribe to the TableElement's vertical scroll's ValueChanged event and add new data when the value reaches the maximum:

private void RequestData(int startFrom, int count) { for (int i = 0; i < count; i++) { DataRow row = dt.NewRow(); row["ID"] = startFrom + i; dt.Rows.Add(row); } } private void VScrollBar_ValueChanged(object sender, EventArgs e) { if (dgwData.TableElement.VScrollBar.Value + dgwData.TableElement.VScrollBar.LargeChange >= dgwData.TableElement.VScrollBar.Maximum) { int maxVScrollBarBefore = dgwData.TableElement.VScrollBar.Maximum; dgwData.SelectionChanged -= dgwData_SelectionChanged; dgwData.TableElement.VScrollBar.ValueChanged -= VScrollBar_ValueChanged; RequestData(dt.Rows.Count, rowsToCharge); dgwData.SelectionChanged += dgwData_SelectionChanged; dgwData.TableElement.VScrollBar.ValueChanged += VScrollBar_ValueChanged; } }

You will notice that when you use the mousewheel the scrollbar is being updated, but when you use the arrows it is not.

Workaround: Invoke the UpdateScrollRange method of the TableElement's RowScroller after adding the new data: dgwData.TableElement.RowScroller.UpdateScrollRange();
Declined
Last Updated: 31 Mar 2014 10:12 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 1
Category: GridView
Type: Bug Report
2
To reproduce:
- add RadGridView and fill it with data;
- use the following code for saving the layout: string layout;
using (MemoryStream ms = new MemoryStream())
{
    radGridView1.SaveLayout(ms);
    ms.Position = 0;
    byte[] buffer = new byte[ms.Length - 1];

    ms.Read(buffer, 0, buffer.Length);
    layout = Convert.ToBase64String(buffer);
    ms.Close();
}

When you try to load the saved layout, using the following code, DataException is thrown:
using (MemoryStream stream = new MemoryStream(Convert.FromBase64String(layout)))
{
    radGridView1.LoadLayout(stream);
}

Workaround: save the layout in xml file
Completed
Last Updated: 20 Feb 2014 15:14 by ADMIN
To reproduce:
- add RadGridView and use the following code:

public Form1()
{
    InitializeComponent();

    List<ColorItem> list = new List<ColorItem>();
    List<Color> colors = new List<Color>()
    {
        Color.Red,
        Color.Black,
        Color.Blue,
        Color.Pink,
        Color.Green,
        Color.Yellow,
        Color.Purple,
        Color.Aqua,
        Color.Orange,
        Color.Fuchsia
    };

    for (int i = 0; i < 10; i++)
    {
        list.Add(new ColorItem(i, colors[i], colors[i].Name));
    }

    radGridView1.DataSource = list;
    radGridView1.CellValidating += radGridView1_CellValidating;
}

private void radGridView1_CellValidating(object sender, CellValidatingEventArgs e)
{
    if (e.ActiveEditor is GridColorPickerEditor && (Color)e.Value == Color.Aqua)
    {
        e.Cancel = true;
    }
}

Steps: 
1. Select the "Color" column of a certain cell and activate the editor;
2. Select Color.Aqua and press Tab to close the currently active GridColorPickerEditor;
As a result InvalidCastException is thrown.

Workaround: use a custom editor derivative of BaseGridEditor:
radGridView1.EditorRequired += radGridView1_EditorRequired;

private void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
{
    if (e.EditorType == typeof(GridColorPickerEditor))
    {
        e.Editor = new CustomColorEditor();
    }
}

public class CustomColorEditor : BaseGridEditor
{
    TypeConverter converter = TypeDescriptor.GetConverter(typeof(Color));

    protected override Telerik.WinControls.RadElement CreateEditorElement()
    {
        return new GridColorPickerElement();
    }

    public override object Value
    {
        get
        {
            GridColorPickerElement editorElement = this.EditorElement as GridColorPickerElement;
            return editorElement.GetColorValue();
        }
        set
        {
            GridColorPickerElement editorElement = this.EditorElement as GridColorPickerElement;
            if (value is Color)
            {
                editorElement.SetColorValue((Color)value);
            }
            else if (value is string)
            {
                editorElement.SetColorValue((Color)converter.ConvertFromString((string)value));
            }
        }
    }
}
Completed
Last Updated: 31 Mar 2014 09:22 by Jesse Dyck
To reproduce: 
-add RadGridView with 2 columns - ID and Name; 
-add RadButton and use the following code:
public Form1() { InitializeComponent(); AddSelfReferencingColumns(grid, "Id", "Parent.Id"); this.grid.DataSource = TestDataGenerator.GenerateTestData(); } public void AddSelfReferencingColumns(RadGridView grid, string childKey, string parentKey) { GridViewTextBoxColumn col1 = new GridViewTextBoxColumn("hiddenColumnId", childKey); GridViewTextBoxColumn col2 = new GridViewTextBoxColumn("hiddenColumnParentId", parentKey); grid.MasterTemplate.Columns.Add(col1); grid.MasterTemplate.Columns.Add(col2); grid.Columns["hiddenColumnId"].IsVisible = false; grid.Columns["hiddenColumnParentId"].IsVisible = false; grid.Relations.AddSelfReference(grid.MasterTemplate, "hiddenColumnId", "hiddenColumnParentId"); } void refreshButton_Click(object sender, System.EventArgs e) { this.grid.DataSource = TestDataGenerator.GenerateTestData(); } class TestDataGenerator { public static IList<TestObject> GenerateTestData() { IList<TestObject> result = new List<TestObject>(); TestObject top = new TestObject { Id = 1, Name = "Top" }; result.Add(top); for (int i = 1; i < 4; i++) { TestObject firstChild = new TestObject() { Id = 10 * i, Name = string.Format("First level child {0}", i), Parent = top }; result.Add(firstChild); for (int j = 1; j < 10; j++) { TestObject secondChild = new TestObject() { Id = 10 * i + j, Name = string.Format("Second level child {0}", j), Parent = firstChild }; result.Add(secondChild); } } return result; } } class TestObject { public long Id { get; set; } public string Name { get; set; } public TestObject Parent { get; set; } }

Steps to reproduce: 1.Type in Name column filter i.e. "F" 2.Press refresh button. The grid is empty, even though the new list contains the same data (different objects).

Workaround: void refreshButton_Click(object sender, System.EventArgs e) { FilterDescriptorCollection filters = new FilterDescriptorCollection(); foreach (FilterDescriptor filterItem in this.grid.FilterDescriptors) { filters.Add(filterItem); } this.grid.DataSource = TestDataGenerator.GenerateTestData(); this.grid.FilterDescriptors.Clear(); foreach (FilterDescriptor filter in filters) { this.grid.FilterDescriptors.Add(filter); } }
Completed
Last Updated: 31 Mar 2014 10:10 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
To reproduce: 
-add RadGridView and use the following code: public Form1() { InitializeComponent(); radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; radGridView1.AddNewRowPosition = SystemRowPosition.Bottom; radGridView1.Columns.Add("A"); radGridView1.Columns.Add("B"); radGridView1.Columns.Add("C"); radGridView1.CellValidating += radGridView1_CellValidating; } void radGridView1_CellValidating(object sender, CellValidatingEventArgs e) { if ((string)e.Value == "11") { e.Cancel = true; } } Follow the steps: 1. First go to A and enter some value, hit TAB and go to B and enter some value. 2. Hit TAB and move to C. 3. Enter "11". 4. Hit TAB. Validation fails, but the new row is entered (calling radGridView1_RowValidating and ignoring e.Cancel = true; of radGridView1_CellValidating) 5. The erroneous value is copied to Column C in the new "new row". 6. radGridView1_CellValidating is called again.

Workaround: 
BaseGridBehavior gridBehavior = radGridView1.GridBehavior as BaseGridBehavior; gridBehavior.UnregisterBehavior(typeof(GridViewNewRowInfo)); gridBehavior.RegisterBehavior(typeof(GridViewNewRowInfo), new CustomGridNewRowBehavior()); public class CustomGridNewRowBehavior : GridNewRowBehavior { protected override bool ProcessTabKey(KeyEventArgs keys) { GridViewNewRowInfo newRowInfo = (GridViewNewRowInfo)this.GridViewElement.CurrentRow; if (newRowInfo.PinPosition == PinnedRowPosition.Bottom || newRowInfo.RowPosition == SystemRowPosition.Bottom) { FieldInfo fi = this.GridControl.GridBehavior.GetType().GetField("defaultRowBehavior", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); GridRowBehavior rowBehavior = fi.GetValue(this.GridControl.GridBehavior) as GridRowBehavior; MethodInfo mi = rowBehavior.GetType().GetMethod("ProcessTabKey", BindingFlags.NonPublic | BindingFlags.Instance); return (bool)mi.Invoke(rowBehavior, new object[] { keys }); } return base.ProcessTabKey(keys); } }
Completed
Last Updated: 27 May 2014 10:19 by ADMIN
ADMIN
Created by: Georgi I. Georgiev
Comments: 0
Category: GridView
Type: Bug Report
1
To reproduce:
Add a RadGridView with a GridViewComboBoxColumn and add 70000 items as datasource. You will notice that openning it is slow.

Workaround:

Use the following custom editor:

public class MyEditor : RadDropDownListEditor
{
    protected override RadElement CreateEditorElement()
    {
        return new MyEditorElement()
        {
            SyncSelectionWithText = false
        };
    }
}

public class MyEditorElement : RadDropDownListEditorElement
{
    public override void NotifyOwner(PopupEditorNotificationData notificationData)
    {
        if (notificationData.notificationContext == PopupEditorNotificationData.Context.TextChanged && !this.SyncSelectionWithText)
        {
            return;
        }

        base.NotifyOwner(notificationData);
    }
}
Completed
Last Updated: 12 Mar 2014 11:07 by ADMIN
To reproduce: - Subscribe to the grids KeyDown event. - You will notice that KeyDown event is not fired when the control key is pressed. 

Workaround: - Use the KeyUp event instead. - Also setting the ClipboardCopyMode property to disabled will activate the event for this case. 
Completed
Last Updated: 20 Aug 2015 10:34 by ADMIN
To reproduce: Create a RadGridView and set its view to ColumnGroupsViewDefinition following this article - http://www.telerik.com/help/winforms/gridview-viewdefinitions-column-groups-view.html. The text in the headers long enough so it does not fit in the cells. Using the ViewCellFormatting event set each cell's TextWrap property to true. You will notice that the header cells are not being TextWrapped 
Completed
Last Updated: 12 Mar 2014 13:32 by ADMIN
Add the ability to access the ColumnChooser opening in order to set its properties. Currently, every time when the user opens the ColumnChoser new instance is created and because of this its properties and events are no longer available. This feature will 

Resolution:
Add the ColumnChooserCreated event which access and  allow to customize the ColumnChooser. 

//subscribe to the event ColumnChooserCreated
this.radGridView1.ColumnChooserCreated += new ColumnChooserCreatedEventHandler(radGridView1_ColumnChooserCreated);
			
//customize the ColumnChooser
void radGridView1_ColumnChooserCreated(object sender, Telerik.WinControls.UI.ColumnChooserCreatedEventArgs e)
{
    e.ColumnChooser.ForeColor = Color.DarkGreen;
    e.ColumnChooser.Text = "My title";
    e.ColumnChooser.ColumnChooserControl.ColumnChooserElement.Font = this.Font;
    e.ColumnChooser.ColumnChooserControl.ColumnChooserElement.Text = "My text";
}