Completed
Last Updated: 24 Aug 2015 13:05 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    DataTable dt = new DataTable();

    DataColumn colId = new DataColumn("Id", typeof(int));
    DataColumn colItem = new DataColumn("Item", typeof(string));
    DataColumn colPrice = new DataColumn("Price", typeof(decimal));

    dt.Columns.Add(colId);
    dt.Columns.Add(colItem);
    dt.Columns.Add(colPrice);

    for (int i = 0; i < 10; i++)
    {
        dt.Rows.Add(i % 5, "Item" + i, i * 2.25m);
    }

    GridViewDecimalColumn col = new GridViewDecimalColumn();
    col.HeaderText = "Id";
    col.Name = "Id";
    col.FieldName = "Id";

    radGridView1.Columns.Add(col);

    GridViewTextBoxColumn col1 = new GridViewTextBoxColumn();
    col1.HeaderText = "Item";
    col1.Name = "Item";
    col1.FieldName = "Item";

    radGridView1.Columns.Add(col1);

    GridViewMaskBoxColumn col2 = new GridViewMaskBoxColumn();
    col2.HeaderText = "Price";
    col2.Name = "Price";
    col2.FieldName = "Price";

    col2.MaskType = MaskType.Standard;
    col2.Mask = "###";
    col2.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;

    radGridView1.Columns.Add(col2);
    radGridView1.DataSource = dt;
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

    this.radGridView1.ValueChanging += radGridView1_ValueChanging;
    this.radGridView1.ValueChanged += radGridView1_ValueChanged;
}

private void radGridView1_ValueChanged(object sender, EventArgs e)
{
    Console.WriteLine("ValueChanged");
}

private void radGridView1_ValueChanging(object sender, ValueChangingEventArgs e)
{
    Console.WriteLine("ValueChanging >> old value: " + e.OldValue + " new value: " + e.NewValue);
}


Declined
Last Updated: 24 Aug 2015 13:05 by ADMIN
DECLINED: This happens because you are setting a non-image value to a GridViewImageColumn. The GridViewImageColumn is designed to work with image data directly and if any non-image data is used with this column, this will result in a large number of internal exceptions which are thrown while the column tries to read the image. The throw operation is an expensive one and this causes the slowdown. Also, note that the slowdown is much heavier when running the application with the debugger attached, because when this is the case, each internally thrown exception is written to the console, and writing to the console is an even more expensive operation. 

If the image is to be applied on the CellFormatting event and the value of the cells in a column are not going to be images, then GridViewTextBoxColumn should be used instead.

To reproduce: add a RadGridView and an  ImageList with two images. Use the following code snippet:

public Form1()
{
    InitializeComponent();

    DataTable dt = new DataTable();
    for (int i = 0; i < 10; i++)
    {
        dt.Columns.Add("Pic" + i);
    }
    
    for (int i = 0; i < 100; i++)
    {
        DataRow newRow = dt.NewRow();
        foreach (DataColumn col in dt.Columns)
        {
            newRow[col.ColumnName] = i;
        }
        dt.Rows.Add(newRow);
    }
    radGridView1.AutoGenerateColumns = false;
    
    for (int i = 0; i < 10; i++)
    {
        GridViewImageColumn imgCol = new GridViewImageColumn("col" + i);
        imgCol.Width = 100;
        imgCol.FieldName = "Pic" + i;
        this.radGridView1.Columns.Add(imgCol);
    }

    this.radGridView1.DataSource = dt;

    this.radGridView1.CellFormatting += radGridView1_CellFormatting;
}

private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
{
    if (e.Row is GridViewDataRowInfo)
    {
        e.CellElement.Image = this.imageList1.Images[e.RowIndex % 2];
    }
}
Completed
Last Updated: 28 Nov 2014 06:56 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    BindingSource bs1 = new BindingSource();
    BindingSource bs2 = new BindingSource();

    DataTable dt1 = new DataTable();
    dt1.Columns.Add("MortgageId", typeof(string));
    dt1.Columns.Add("MortgageNo", typeof(string));
    for (int i = 0; i < 50; i++)
    { 
        dt1.Rows.Add(i, Guid.NewGuid().ToString().Substring(0, 5));              
    }
    bs1.DataSource = dt1;

    DataTable dt2 = new DataTable();
    dt2.Columns.Add("PaymentCode", typeof(string));
    dt2.Columns.Add("Description", typeof(string));

    for (int i = 0; i < 50; i++)
    {
        dt2.Rows.Add(Guid.NewGuid().ToString().Substring(0, 5), Guid.NewGuid().ToString().Substring(0, 5));
    }
    bs2.DataSource = dt2;

    GridViewMultiComboBoxColumn col1 = new GridViewMultiComboBoxColumn("MortgageId");          
    col1.DataSource = bs1;
    col1.FieldName = "MortgageId";
    col1.DisplayMember = "MortgageId";
    col1.ValueMember = "MortgageId";
    col1.Width = 70;
    this.radGridView1.Columns.Add(col1);

    col1 = new GridViewMultiComboBoxColumn("PaymentCode");         
    col1.DataSource = bs2;
    col1.DisplayMember = "PaymentCode";
    col1.ValueMember = "PaymentCode";
    col1.FieldName = "PaymentCode";
    col1.Width = 70;
    this.radGridView1.Columns.Add(col1);

    this.radGridView1.CellEditorInitialized += radGridView1_CellEditorInitialized;
}

private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    if (e.Column.Name == "MortgageId")
    {
        RadMultiColumnComboBoxElement editor = e.ActiveEditor as RadMultiColumnComboBoxElement;
        if (editor != null)
        {
            editor.EditorControl.FilterDescriptors.Clear();
            editor.EditorControl.Columns.Clear();
            editor.EditorControl.MasterTemplate.AutoGenerateColumns = false;
            editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("MortgageId"));
            editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("MortgageNo"));
            editor.DropDownWidth = 200;    
        }
        return;
    }
    if (e.Column.Name == "PaymentCode")
    {
        RadMultiColumnComboBoxElement editor = e.ActiveEditor as RadMultiColumnComboBoxElement;
        if (editor != null)
        {
            editor.EditorControl.FilterDescriptors.Clear();
            editor.EditorControl.Columns.Clear();
            editor.EditorControl.MasterTemplate.AutoGenerateColumns = false;
            editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("PaymentCode"));
            editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("Description"));
            editor.DropDownWidth = 200;    
        }
        return;
    }
}


Workaround: do not set the RadMultiColumnComboBoxElement.EditorControl.MasterTemplate.AutoGenerateColumns property to false in the CellEditorInitialized event .
Completed
Last Updated: 26 Jun 2015 11:08 by ADMIN
To reproduce:

1. Add a RadGridView with two GridViewMultiComboBoxColumns at design time.
2. Bind both of the columns at design time to two different data sources.
3. In the CellEditorInitialized event, set the RadMultiColumnComboBoxElement.AutoSizeDropDownToBestFit property to true.
4. Run the application and open the editor for one of the GridViewMultiComboBoxColumns . You will notice that the columns are automatically sized to fit the content. However, if you open the editor for the other GridViewMultiComboBoxColumn, you will see that columns are not auto sized correctly.  Please refer to the attached gif file.

Workaround:
private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    RadMultiColumnComboBoxElement mccbEditor = e.ActiveEditor as RadMultiColumnComboBoxElement;
    if (mccbEditor != null)
    {
        mccbEditor.AutoSizeDropDownToBestFit = true;
        mccbEditor.PopupOpening -= mccbEditor_PopupOpening;
        mccbEditor.PopupOpening += mccbEditor_PopupOpening;
    }
}

private void mccbEditor_PopupOpening(object sender, CancelEventArgs e)
{
    RadMultiColumnComboBoxElement mccbEditor = sender as RadMultiColumnComboBoxElement;
    if (mccbEditor != null)
    { 
        mccbEditor.EditorControl.BestFitColumns(BestFitColumnMode.AllCells);
        int width = 0;
        foreach (GridViewColumn c in mccbEditor.EditorControl.Columns)
        {
            width += c.Width;
        }
        width += mccbEditor.EditorControl.TableElement.VScrollBar.Size.Width;
        
        mccbEditor.MultiColumnPopupForm.Size = new Size(width, mccbEditor.MultiColumnPopupForm.Size.Height);
    }
}
Completed
Last Updated: 12 Dec 2014 15:12 by ADMIN
To reproduce:
-Try to format the cell value by using html in the HTMLCellFormatting event.

Resolution: You should set the ExcapeHTMLChars property of the CellElement to false in order to format the content of the cell with HTML tags. This can be done in the HTMLCellFormatting event handler of the exporter.
Completed
Last Updated: 13 Oct 2015 10:11 by ADMIN
To reproduce: 
- Add grid to a blank form. 
- Add summary rows and group descriptors.
- Add rows upon a button click.
- You will notice that not all rows are visible.

Workaround: 
radGridView1.TableElement.Update(GridUINotifyAction.RowHeightChanged, null);
radGridView1.TableElement.VScrollBar.Value = radGridView1.TableElement.VScrollBar.Maximum - radGridView1.TableElement.VScrollBar.LargeChange;
Completed
Last Updated: 20 Oct 2015 09:04 by ADMIN
Use the following code snippet:

public Form1()
{
    InitializeComponent();

    DataTable dt = new DataTable();
    dt.Columns.Add("Id", typeof(int));
    dt.Columns.Add("Item", typeof(string));
    dt.Columns.Add("Price", typeof(decimal));

    for (int i = 0; i < 10; i++)
    {
        dt.Rows.Add(i % 5, "Item" + i, i * 2.25m);
    }

    this.radGridView1.DataSource = dt;
    GridViewDecimalColumn customCalculatedCol = new GridViewDecimalColumn("Custom Calculated Column");
    customCalculatedCol.Name = "Custom Calculated Column";
    customCalculatedCol.Expression = "SumIf(Id)";
    radGridView1.Columns.Add(customCalculatedCol);

    GridViewDecimalColumn customCalculatedCola = new GridViewDecimalColumn("Custom Col_A");         
    radGridView1.Columns.Add(customCalculatedCola);

    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

    Telerik.Data.Expressions.ExpressionContext.Context = new CustomExpressionContext(radGridView1);
}

public class CustomExpressionContext : Telerik.Data.Expressions.ExpressionContext
{
    private RadGridView grid;

    public CustomExpressionContext(RadGridView grid)
    {
        this.grid = grid;
    }

    public double SumIf(int currentId)
    {
        double countIf = 0;
        decimal sumIf = 0;
        foreach (GridViewRowInfo r in this.grid.Rows)
        {
            if ((int)r.Cells["Id"].Value == currentId)
            {
                countIf++;
                sumIf += (decimal)r.Cells["Price"].Value;
            }

           
        }
        return (double)sumIf;
    }
}

Workaround: invalidate the affected rows manually

private void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
    if (e.Column.Name == "Price" || e.Column.Name == "Id")
    {
        foreach (GridViewRowInfo r in this.radGridView1.Rows)
        {
            if ((int)r.Cells["Id"].Value == (int)e.Row.Cells["Id"].Value)
            {
                r.InvalidateRow();
            }
        }
    }
}
Completed
Last Updated: 21 Nov 2014 13:09 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    List<DiffItem> diffItemsMain = GetSampleDataDiffItems(12500);
    radGridView1.DataSource = diffItemsMain;
    radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "Index", "ParentIndex");
    radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
}

private List<DiffItem> GetSampleDataDiffItems(int rootInstances)
{
    List<DiffItem> diffItems = new List<DiffItem>();
    for (int j = 0; j < rootInstances; j++)
    {
        string[,] sampleData = GetSampleDataArray();
        string parentIndex = "";
        for (int i = 0; i <= sampleData.GetUpperBound(0); i++)
        {
            DiffItem diffItem = new DiffItem(Guid.NewGuid().ToString());  
            diffItem.ObjectStatus = sampleData[i, 0];                            
            diffItem.ObjectType = sampleData[i, 1];                          
            diffItem.ObjectLabel = sampleData[i, 2];                          
            diffItem.ChangeType = sampleData[i, 3];                          
            diffItem.ObjectAccepted = sampleData[i, 4];                          
            diffItem.ParentIndex = parentIndex;                                 
            diffItems.Add(diffItem);
            parentIndex = diffItem.Index;
        }
    }
    return diffItems;
}

private string[,] GetSampleDataArray()
{
    string[,] sampleData = new string[,]
    {
        { "New", "Parent", "A572", "Added", "Undecided" },
        { "New", "Child", "CM1", "Added", "Undecided" },
        { "Modified", "GrandChild", "A573", "Modified", "Undecided" },
        { "Modified", "GreatGrandChild", "CM2", "Modified", "Undecided" }
    };
    return sampleData;
}

public class DiffItem
{
    public DiffItem(string index)
    {
        Index = index;
    }

    public string ObjectStatus { get; set; }

    public string Index { get; set; }

    public bool ObjectSelected { get; set; }

    public string ObjectType { get; set; }

    public string ObjectLabel { get; set; }

    public string ChangeType { get; set; }

    public string ObjectAccepted { get; set; }

    public string ParentIndex { get; set; }
}

Try to edit one random cell. You will notice that after pressing the Enter key to commit the changes, the editor is closed after a few seconds.

Resolution: 
The slowdown should be experienced only when editing columns which participate in the self-reference relation.
Completed
Last Updated: 21 Nov 2014 17:39 by Joao
To reproduce:
- Add several rows to a grid where the paging is enabled (make sure that last row has unique values)
- Use the excel like filtering in the first page, notice that the last value is missing.

Workaround:
void radGridView1_FilterPopupInitialized(object sender, FilterPopupInitializedEventArgs e)
{
    RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
    if (popup != null)
    {
        foreach (GridViewRowInfo row in radGridView1.Rows)
        {
            var value = row.Cells[e.Column.Name].Value;
            if (!(popup.MenuTreeElement.DistinctListValues.Contains(value)))
            {
                popup.MenuTreeElement.DistinctListValues.Add(value.ToString(), value.ToString()) ;
            }
        }
    }
}
Completed
Last Updated: 27 Nov 2014 12:12 by ADMIN
It is related to GridViewCalculatorColumn, GridViewBrowseColumn.

Workaround: use a custom row behavior and override the ProcessAlphaNumericKey method to initialize the editor with the respective value.

http://www.telerik.com/help/winforms/gridview-rows-row-behaviors.html
Completed
Last Updated: 18 Nov 2014 06:47 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    DataTable dt = new DataTable();
    dt.Columns.Add("Id", typeof(int));
    dt.Columns.Add("ParentId", typeof(int));
    dt.Columns.Add("IsActive", typeof(bool));
    dt.Columns.Add("Title", typeof(string));

    for (int i = 1; i < 6; i++)
    {
        dt.Rows.Add(i, 0, i % 2 == 0, "Title" + i);
    }
    Random rand = new Random();
    int parentIndex = 0;
    for (int i = 6; i < 30; i++)
    {
        parentIndex = rand.Next(1, 6);
        dt.Rows.Add(i, parentIndex, i % 2 == 0, "Title" + i);
    }

    radGridView1.DataSource = dt;
    radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
    radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "Id", "ParentId");

    GroupDescriptor descriptor = new GroupDescriptor();
    descriptor.GroupNames.Add("Title", System.ComponentModel.ListSortDirection.Ascending);
    radGridView1.GroupDescriptors.Add(descriptor);

    this.radGridView1.AllowSearchRow = true;
}
Completed
Last Updated: 28 Nov 2014 08:04 by ADMIN
To reproduce: use the following code snippet:


Steps to repeat:
1. A Self-Referencing Hierarchical Grid is displayed, grouped by the "Title" column.
3. Expand the first group.
4. Check the first row  check box. As a result the editor is activated and its value is changed.  
5. Click on the "+" sign in 1st row of data to expand and see child rows or just close the editor. You will notice that the group is unexpectedly collapsed.

Workaround:

private void radGridView1_ValueChanged(object sender, EventArgs e)
{
    if (this.radGridView1.ActiveEditor is RadCheckBoxEditor)
    {
        if (this.radGridView1.CurrentRow.Group != null && this.radGridView1.CurrentRow.Group.IsExpanded)
        {
            this.radGridView1.EndEdit();
            this.radGridView1.CurrentRow.Group.Expand();
        }
    }
}
Unplanned
Last Updated: 30 Mar 2016 07:58 by ADMIN
When the current cell belongs to one of the data rows and you click with the left mouse button over a GridFilterCellElement , the editor is activated. However, if you navigate with the arrow keys, the editor is not activated and the user can not see any indication about the current cell.

Workaround:

private void radGridView1_ViewCellFormatting(object sender,
    Telerik.WinControls.UI.CellFormattingEventArgs e)
{
    GridFilterCellElement filterCell = e.CellElement as GridFilterCellElement;
    if (filterCell != null)
    {
        if (filterCell.IsCurrent)
        {
            filterCell.BorderWidth = 3;
        }
        else
        {
            filterCell.BorderWidth = 1;
        }
    }
}
Completed
Last Updated: 14 Nov 2014 16:03 by ADMIN
To reproduce:

Download the attached project and run it. You will see the memory will increase
Completed
Last Updated: 26 Jan 2015 15:06 by ADMIN
To reproduce:
- Add grid to a form and populate it with data.
- Show and hide the the excel like filtering several times.
Completed
Last Updated: 28 Mar 2024 12:09 by ADMIN
When Excel-like filtering is enabled and the user selects an item from the "Available Filters" drop down menu, a CompositeFilterForm is shown.
Completed
Last Updated: 26 Nov 2014 10:00 by ADMIN
When current cell is checked (CheckBoxColumn) and the user scrolls one time  with the mouse wheel there is a blank space below the grid.
Completed
Last Updated: 24 Aug 2015 13:05 by ADMIN
Note: InvalidCastException in case of converting Char to Boolean.

To reproduce: use the following code snippet:

public Form1()
{
    InitializeComponent();

    DataTable dt = new DataTable();
    dt.Columns.Add("Id", typeof(string));
    dt.Columns.Add("Name", typeof(string));
    dt.Columns.Add("Active", typeof(string));

    dt.Rows.Add("1", "Item1", "Y");
    dt.Rows.Add("2", "Item2", "N");

    this.radGridView1.DataSource = dt;
    this.radGridView1.Columns.RemoveAt(2);
    GridViewCheckBoxColumn checkBoxColumn = new GridViewCheckBoxColumn();
    checkBoxColumn.FieldName = "Active";
    checkBoxColumn.DataTypeConverter = new ToggleStateConverter();
    radGridView1.MasterTemplate.Columns.Add(checkBoxColumn);
    radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    radGridView1.EnableFiltering = true;
}

public class ToggleStateConverter : TypeConverter
{
    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
    {
        return destinationType == typeof(ToggleState);
    }

    public override object ConvertTo(ITypeDescriptorContext context, 
        CultureInfo culture, object value, Type destinationType)
    {
        string charValue = value + "";

        switch (charValue)
        {
            case "Y":
                return ToggleState.On;
            case "N":
                return ToggleState.Off;
            case "M":
                return ToggleState.Indeterminate;
        }

        return base.ConvertTo(context, culture, value, destinationType);
    }

    public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
    {
        return sourceType == typeof(ToggleState);
    }

    public override object ConvertFrom(ITypeDescriptorContext context, 
        CultureInfo culture, object value)
    {
        ToggleState state = (ToggleState)value;

        switch (state)
        {
            case ToggleState.On:
                return "Y";
            case ToggleState.Off:
                return "N";
            case ToggleState.Indeterminate:
                return "M";
        }

        return base.ConvertFrom(context, culture, value);
    }
}

Try to filter by "Name" column. As a result FormatException  occurs because of inability to convert "Y"/"N" to Boolean although a custom TypeConverter is implemented to handle it.
Completed
Last Updated: 14 Nov 2014 15:12 by ADMIN
To reproduce:

Download the attached project and expand the first row. Collapse it and expand the second row. You will see that both rows will be expanded.

Workaround:

void radGridView1_ChildViewExpanding(object sender, ChildViewExpandingEventArgs e)
{
    Point p = this.radGridView1.PointToClient(MousePosition);
    RadElement el = this.radGridView1.ElementTree.GetElementAtPoint(p);
    if (el != null)
    {
        GridRowElement rowElement = el.FindAncestor<GridRowElement>();
        if (rowElement != null && e.ParentRow.Index != rowElement.RowInfo.Index && !e.IsExpanded)
        {
            e.Cancel = true;
        }
    }
}
Completed
Last Updated: 21 Nov 2014 14:22 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
To reproduce: use the following code snippet:

DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("Duration", typeof(TimeSpan));

for (int i = 0; i < 20; i++)
{
    dt.Rows.Add(i, "Item" + i, TimeSpan.FromMinutes(i * 10));
}

this.radGridView1.DataSource = dt;
this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
this.radGridView1.EnableFiltering = true;
this.radGridView1.ShowHeaderCellButtons = true;

Try to filter via the Excel-Like filtering functionality.

Workaround: use dt.Columns.Add("Duration", typeof(string)); instead of dt.Columns.Add("Duration", typeof(TimeSpan));