Completed
Last Updated: 17 Aug 2015 11:02 by ADMIN
To reproduce:
Add a RadGridView and use the RowFormatting event for showing rows with errors. Use a timer to change the data. The RowFormatting  event fires when the user does not group rows. But after grouping the rows by any column, the grid is not refreshed according to the applied style in RowFormatting event. In order to reproduce the problem, use the following code:
private readonly BindingList<DataItem> _items = new BindingList<DataItem>();
private readonly Random _rnd = new Random();

public Form1()
{
    InitializeComponent();

    for (var i = 1; i <= 10; i++)
    {
        _items.Add(new DataItem("Text1 = " + i, "Type = None", _rnd.Next(0, 2) == 1));
    }
    radGridView1.DataSource = _items;

    timer1.Start();
}

private void radGridView1_RowFormatting(object sender, Telerik.WinControls.UI.RowFormattingEventArgs e)
{
    var item = e.RowElement.Data.DataBoundItem as DataItem;
    if (item != null && item.IsDataCorrect)
    {
        e.RowElement.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local);
    }
    else
    {
        e.RowElement.ForeColor = Color.Red;
    }
}

private void timer1_Tick(object sender, EventArgs e)
{
    foreach (var item in _items)
    {
        item.IsDataCorrect = _rnd.Next(0, 2) == 1;
    }
}


ic class DataItem : INotifyPropertyChanged

private bool _isDataCorrect;
private string _text;
private string _type;

public DataItem(string text1, string type, bool isOk)
{
    Text = text1;
    Type = type;
    IsDataCorrect = isOk;
}

public event PropertyChangedEventHandler PropertyChanged;

public bool IsDataCorrect
{
    get
    {
        return _isDataCorrect;
    }
    set
    {
        if (_isDataCorrect != value)
        {
            _isDataCorrect = value;
            OnPropertyChanged("IsDataCorrect");
        }
    }
}

public string Text
{
    get
    {
        return _text;
    }
    set
    {
        if (_text != value)
        {
            _text = value;
            OnPropertyChanged("Text1");
        }
    }
}

public string Type
{
    get
    {
        return _type;
    }
    set
    {
        if (_type != value)
        {
            _type = value;
            OnPropertyChanged("Type");
        }
    }
}

protected virtual void OnPropertyChanged(string propertyName)
{
    var handler = PropertyChanged;
    if (handler != null)
    {
        handler(this, new PropertyChangedEventArgs(propertyName));
    }
}
Completed
Last Updated: 17 Aug 2015 10:06 by ADMIN
To reproduce:
private RadGridView radGridView1;

public Form1()
{
    InitializeComponent();
    radGridView1 = new RadGridView() { Dock = DockStyle.Fill };
    Controls.Add(radGridView1);

    List<Item> items = new List<Item>();
    for (int i = 0; i < 10; i++)
    {
        items.Add(new Item(i, "Item" + i, DateTime.Now.AddDays(i)));
    }
    radGridView1.AutoGenerateColumns = true;
    this.radGridView1.DataSource = items;
    this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    this.radGridView1.EnableFiltering = true;

    this.radGridView1.CustomFiltering += radGridView1_CustomFiltering;
    radGridView1.EnableCustomFiltering = true;
}

void radGridView1_CustomFiltering(object sender, GridViewCustomFilteringEventArgs e)
{
    e.Handled = false;
    e.Visible = true;

    var item = (Item)e.Row.DataBoundItem;

    if (item == null)
        return;

    if (item.Name.EndsWith("Item"))
    {
        e.Handled = true;
        e.Visible = false;
    }
}

public class Item
{
    public int Id { get; set; }

    public string Name { get; set; }

    public Nullable<DateTime> Date { get; set; }

    public Item(int id, string name, Nullable<DateTime> date)
    {
        this.Id = id;
        this.Name = name;
        this.Date = date;
    }
}


Workaround:

private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
{
    this.radGridView1.MasterTemplate.Refresh();
}
Completed
Last Updated: 17 Aug 2015 08:54 by ADMIN
To reproduce:

Add a RadGridView. Create a DataTable with 3 columns with data type - Decimal. To the last column set the following expression - "column1 + column2". Add some rows with some values. Turn on excel like filtering - http://www.telerik.com/help/winforms/gridview-filtering-excel-like-filtering.html. Subscribe to the CellValueChanged event and add the following code:

if (this.radGridView1.CurrentRow.DataBoundItem != null)
            {
                ((DataRowView)this.radGridView1.CurrentRow.DataBoundItem).Row.EndEdit(); // force row subtotal update
            }


Start the application and filter the last column by some of the available values. Change a value in one of the first two cells. You will notice that the last cell's value is not updated although it is updated in the data table.  This behavior does not occur when the grid is not filtered.
Completed
Last Updated: 17 Aug 2015 08:29 by ADMIN
To reproduce:
            this.radGridView1.AllowEditRow = false;
            this.radGridView1.AllowColumnHeaderContextMenu = true;
            this.radGridView1.AllowCellContextMenu = true;

Workaround: subscribe to the ContextMenuOpening event and hide the items. An alternative solution is to use RadGridView in read-only mode. 
Completed
Last Updated: 17 Aug 2015 08:22 by ADMIN
To reproduce:

Add a RadGridView and three GridViewComboBoxColumns with repetitive values:

for (int i = 0; i < 3; i++)
{
    List<int> datasource = new List<int>();
    for (int j = 0; j < 12; j++)
    {
        datasource.Add(j);
    }
    this.Grid.Columns.Add(new GridViewComboBoxColumn()
        {
            DataSource = datasource
        });
}

for (int i = 0; i < 10; i++)
{
    for (int j = 0; j < 5; j++)
    {
        this.Grid.Rows.Add(i, i, i);
    }
}

Start the project and sort second and last column by the same value and make sure that you have vertical scrollbar.

Select a cell in the second column change its value and press the tab key(or click on another cell in the same row). You will see that the scrollbar will go to the bottom of the grid.

Workaround:

Use the following class:

public class ActionExecuteHelper
    {
        #region Singleton

        private static ActionExecuteHelper instance;
        private static readonly object syncRoot = new object();

        public static ActionExecuteHelper Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (syncRoot)
                    {
                        if (instance == null)
                        {
                            instance = new ActionExecuteHelper();
                        }
                    }
                }
                return instance;
            }
        }

        #endregion

        private readonly Timer timer;

        public ActionExecuteHelper()
        {
            this.timer = new Timer();
        }

        public void ExecuteDelayedAction(Action action, int delayInMilliseconds)
        {
            EventHandler timerTick = null;

            timerTick = delegate
            {
                this.timer.Stop();
                this.timer.Tick -= timerTick;
                action.Invoke();
            };

            this.timer.Tick += timerTick;
            this.timer.Interval = delayInMilliseconds;
            this.timer.Start();
        }
    }


And use it with the following code

private int savedValue;
private void Grid_CellEndEdit(object sender, GridViewCellEventArgs e)
{
    this.Grid.TableElement.VScrollBar.ValueChanged += ValueChangedDelegate;
}

private void ValueChangedDelegate(object sender, EventArgs e)
{
    this.Grid.TableElement.VScrollBar.ValueChanged -= ValueChangedDelegate;
    ActionExecuteHelper.Instance.ExecuteDelayedAction(new Action(this.SetScrollbarValue), 5);
}

private void SetScrollbarValue()
{
    this.Grid.TableElement.VScrollBar.Value = savedValue;
}

private void Grid_ValueChanging(object sender, ValueChangingEventArgs e)
{
    this.savedValue = this.Grid.TableElement.VScrollBar.Value;
}

This way the value of the scrollbar will be saved and restored.
Completed
Last Updated: 17 Aug 2015 08:05 by ADMIN
To reproduce:
- Add a column to the grid and try to set its IsPinned property to true.
Completed
Last Updated: 06 Aug 2015 11:40 by ADMIN
To reproduce: 

1. Add a RadGridView, set ShowRowHeaderColumn to false, AutoSizeColumnsMode to Fill and Dock to Fill. 

2. Add 3 columns and 1 row. 

3. Start the application and click the leftmost cell, you will notice that the header will move with one pixel to the right. 

4. Click the rightmost cell and you will notice the header moving one pixel to the left
Completed
Last Updated: 05 Aug 2015 13:57 by ADMIN
RadGridView - CustomGrouping event is not firing when you change some cell value and RadGridView is data bound via DataSource property.

Workaround:
1.Subscribe to CellEndEdit event of RadGridView:
            this.radGridView1.CellEndEdit += new GridViewCellEventHandler(radGridView1_CellEndEdit);

2. Call Refresh method of MasterTemplate:

        void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            this.radGridView1.MasterTemplate.Refresh();
        }
Completed
Last Updated: 03 Aug 2015 10:50 by Svetlin
If you change the RadGridView in design-time by property builder, the smart tag disappears after closing the builder.
Completed
Last Updated: 03 Aug 2015 10:32 by ADMIN
To reproduce:
- Add GridViewDateTimeColumn.
- Set the editor properties:
private void radGridView_VehicleAbsenceTime_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadDateTimeEditor lEditor = radGridView_VehicleAbsenceTime.ActiveEditor as RadDateTimeEditor;
    if (lEditor != null)
    {
        RadDateTimeEditorElement editorElement = (RadDateTimeEditorElement)lEditor.EditorElement;
        editorElement.Format = DateTimePickerFormat.Custom;
        editorElement.CustomFormat = "dd.MM.yyyy HH:mm";
        editorElement.ShowUpDown = true;
    }
}
- Start the application scroll to the bottom and start editing.
Completed
Last Updated: 24 Jul 2015 10:42 by ADMIN
1. Use the following code snippet:
public Form1()
{
    InitializeComponent();

    this.radGridView1.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
    this.radGridView1.MasterTemplate.EnableAlternatingRowColor = true;
    this.radGridView1.MasterTemplate.EnableFiltering = true;
    this.radGridView1.MasterTemplate.MultiSelect = true;

    for (int i = 0; i < 3; i++)
    {
        this.radGridView1.Columns.Add("Col"+i);
    }
    radGridView1.Rows.Add("test1", "test1", "test1");
    radGridView1.Rows.Add("test2", "test2", "test2");
    radGridView1.Rows.Add("test3", "test3", "test3");
    radGridView1.Rows.Add("test4", "test4", "test4");
    radGridView1.Rows.Add("test5", "test5", "test5");
}

2. Quickly click around  the cells a few times, making sure to drag your mouse a bit  to select a few rows on some of the clicks.
Then quickly click the filter. (sometimes it takes a few tries)

Workaround: use custom GridFilterRowBehavior

            BaseGridBehavior gridBehavior = radGridView1.GridBehavior as BaseGridBehavior;
            gridBehavior.UnregisterBehavior(typeof(GridViewFilteringRowInfo));
            gridBehavior.RegisterBehavior(typeof(GridViewFilteringRowInfo), new CustomGridFilterRowBehavior());

public class CustomGridFilterRowBehavior : GridFilterRowBehavior
{
    protected override bool ProcessMouseSelection(Point mousePosition, GridCellElement currentCell)
    { 
        return false;
    }
}
Completed
Last Updated: 24 Jul 2015 06:30 by Svetlin
Self-referencing hierarchy does not work, when ColumGroupsViewDefinition is applied.
Completed
Last Updated: 23 Jul 2015 14:11 by ADMIN
There is wrong current row selection for bound RadGridView, when using AddNew and ResetBindings methods on same BindingSource.
Declined
Last Updated: 23 Jul 2015 13:47 by ADMIN
Steps to reproduce:

1. Add a GridViewDateTimeColumn to a grid.

2. Add rows where one or more rows should contain null as the columns value.

3. Sort the grid by the date time column. 



WORKAROUND:

Create a custom RadGridDateTimeConverter and assign it as the column's date type converter:

public class CustomRadGridDateTimeConverter : RadGridDateTimeConverter
{
    public CustomRadGridDateTimeConverter(GridViewDateTimeColumn column)
        : base(column)
    { }

    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
    {
        if (destinationType == typeof(DateTime) && value == null)
        {
            return DateTime.MinValue;
        }

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



this.radGridView1.Columns["DateTime"].DataTypeConverter = new CustomRadGridDateTimeConverter(this.radGridView1.Columns["DateTime"] as GridViewDateTimeColumn);
Completed
Last Updated: 23 Jul 2015 13:08 by ADMIN
Completed
Last Updated: 23 Jul 2015 13:03 by ADMIN
Note: if you try to clear the initial minimum value by pressing Backspace or Delete key, the editor value reappears.

To reproduce:

GridViewDecimalColumn decimalColumn2 = new GridViewDecimalColumn("Col2");
decimalColumn2.FieldName = "Number";
decimalColumn2.Minimum = -50;
decimalColumn2.Maximum = 50;

radGridView2.MasterTemplate.Columns.Add(decimalColumn2);
radGridView2.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
radGridView2.EnableFiltering = true;


Workaround:

private void radGridView2_EditorRequired(object sender, Telerik.WinControls.UI.EditorRequiredEventArgs e)
{
    if (e.EditorType == typeof(GridSpinEditor))
    {
        e.EditorType = typeof(CustomEditor);
    }
}

public class CustomEditor : GridSpinEditor
{
    protected override Telerik.WinControls.RadElement CreateEditorElement()
    {
        return new CustomElement();
    }
}

public class CustomElement : GridSpinEditorElement
{
    protected override decimal GetValueFromText()
    {
        if (string.IsNullOrEmpty(this.Text))
        {
            return this.MinValue;
        }
        return base.GetValueFromText();
    }
}
Completed
Last Updated: 22 Jul 2015 15:29 by ADMIN
To reproduce: 
1. Add a GridViewDecimalColumn to a grid with data type int, float, decimal, double, real, money. 
2. Add few rows where one of rows contains null value. 
3. Run the form. Sort the grid by any of column with null data and you will see that the exception is thrown. 

Workaround: 
1. Use custom TypeConverter

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

    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
    {
        if (destinationType == typeof(float) && (value == null || value is DBNull))
        {
            return float.MinValue;
        }
        return value;
    }
}

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

    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
    {
        if (destinationType == typeof(int) && (value == null || value is DBNull))
        {
            return int.MinValue;
        }
        return value;
    }
}

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

    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
    {
        if (destinationType == typeof(decimal) && (value == null || value is DBNull))
        {
            return decimal.MinValue;
        }
        return value;
    }
}

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

    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
    {
        if (destinationType == typeof(double) && (value == null || value is DBNull))
        {
            return double.MinValue;
        }
        return value;
    }
}

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

    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
    {
        if (destinationType == typeof(Single) && (value == null || value is DBNull))
        {
            return Single.MinValue;
        }
        return value;
    }
}

2. Apply the converter to GridViewDecimalColumn

this.radGridView2.Columns["ColumnReal"].DataTypeConverter = new CustomSingleConverter();
this.radGridView2.Columns["ColumnFloat"].DataTypeConverter = new CustomDoubleConverter();
this.radGridView2.Columns["ColumnDecimal"].DataTypeConverter = new CustomDecimalConverter();
this.radGridView2.Columns["ColumnInt"].DataTypeConverter = new CustomIntConverter();
this.radGridView2.Columns["ColumnNumeric"].DataTypeConverter = new CustomDecimalConverter();
this.radGridView2.Columns["ColumnMoney"].DataTypeConverter = new CustomDecimalConverter();
Declined
Last Updated: 22 Jul 2015 14:46 by ADMIN
There should be a Enum (Left, Right, None) property of the Expander Column indicating whether the position of the expander column should be left right or none.  This would be especially important during pinning activities meaning no matter how many columns are being pinned and repositioned in the pinned area of the grid, it would always remain on the left, right or none.
Completed
Last Updated: 22 Jul 2015 14:32 by ADMIN
Steps to reproduce:

1. Add a GridViewDateTimeColumn to a grid.

2. Add rows where one or more rows should contain null as the columns value.

3. Sort the grid by the date time column. 



WORKAROUND:

Create a custom RadGridDateTimeConverter and assign it as the column's date type converter:

public class CustomRadGridDateTimeConverter : RadGridDateTimeConverter
{
    public CustomRadGridDateTimeConverter(GridViewDateTimeColumn column)
        : base(column)
    { }

    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
    {
        if (destinationType == typeof(DateTime) && value == null)
        {
            return DateTime.MinValue;
        }

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



this.radGridView1.Columns["DateTime"].DataTypeConverter = new CustomRadGridDateTimeConverter(this.radGridView1.Columns["DateTime"] as GridViewDateTimeColumn);
Completed
Last Updated: 22 Jul 2015 13:30 by Todor