Completed
Last Updated: 07 Apr 2016 10:20 by ADMIN
ADMIN
Dimitar
Created on: 22 Mar 2016 07:08
Category: GridView
Type: Bug Report
0
FIX. RadGridView - exception when the grid is bound to an array of different objects.
To reproduce:
public abstract class Base
{
    public abstract string Name { get; }
}

public class Child : Base
{
    public override string Name
    {
        get { return "Child"; }
    }
}

public class Child2 : Base
{
    public override string Name
    {
        get { return "Child2"; }
    }
}

public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();

        var list = new List<Base>();
        list.Add(new Child());
        list.Add(new Child());
        list.Add(new Child2());

        radGridView1.DataSource = list.ToArray();
    }
}

Workaround:
 radGridView1.DataSource = list;
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments