Completed
Last Updated: 04 May 2015 09:44 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category:
Type: Bug Report
1
To reproduce:

1. Add a RadCheckedListBox at design time.
2. Drag a random theme from the Toolbox and drop it onto the form.
3. Try to change the RadCheckedListBox.ThemeName property at design time. You will notice the added theme is not present in the drop down.
Completed
Last Updated: 16 Feb 2015 11:23 by ADMIN
To reproduce:
RadListView radListView = new RadListView();
radListView.ViewType = ListViewType.DetailsView;

ListViewDetailColumn listViewDetailColumn1 = new ListViewDetailColumn("Column 0", "File Name");
ListViewDetailColumn listViewDetailColumn2 = new ListViewDetailColumn("Column 1", "Total Size");
ListViewDetailColumn listViewDetailColumn3 = new ListViewDetailColumn("Column 2", "Type");
ListViewDetailColumn listViewDetailColumn4 = new ListViewDetailColumn("Column 3", "Free Space");

radListView.Columns.AddRange(new ListViewDetailColumn[] {
	listViewDetailColumn1, listViewDetailColumn2, listViewDetailColumn3, listViewDetailColumn4 });

ListViewDataItemGroup listViewDataItemGroup1 = new ListViewDataItemGroup("Files Stored on This Computer");
ListViewDataItemGroup listViewDataItemGroup2 = new ListViewDataItemGroup("Hard Disk Drives");
ListViewDataItemGroup listViewDataItemGroup3 = new ListViewDataItemGroup("Devices with Removable Storage");

radListView.Groups.AddRange(new ListViewDataItemGroup[] {
	listViewDataItemGroup1, listViewDataItemGroup2, listViewDataItemGroup3 });

List<ListViewDataItem> items = new List<ListViewDataItem>();
for (int i = 0; i < 11111; i++)
{
	ListViewDataItem listViewDataItem1 = new ListViewDataItem("Shared Documents", new string[] { "Shared Documents", "", "File Folder" });
	ListViewDataItem listViewDataItem2 = new ListViewDataItem("Administrator\'s Documents", new string[] { "Administrator\'s Documents", "", "File Folder" });
	ListViewDataItem listViewDataItem3 = new ListViewDataItem("3.5 Floppy (A:)", new string[] { "3.5 Floppy (A:)", "1.44 MB", "Floppy Drive", "203 KB" });
	ListViewDataItem listViewDataItem4 = new ListViewDataItem("Local Disk (C:)", new string[] { "Local Disk (C:)", "160.4 GB", "Local Disk", "31.02 GB" });
	ListViewDataItem listViewDataItem5 = new ListViewDataItem("Local Disk (D:)", new string[] { "Local Disk (D:)", "136.2 GB", "Local Disk", "57.52 GB" });
	ListViewDataItem listViewDataItem6 = new ListViewDataItem("Local Disk (E:)", new string[] { "Local Disk (E:)", "40.00 GB", "Local Disk", "13.37 GB" });
	ListViewDataItem listViewDataItem7 = new ListViewDataItem("Local Disk (F:)", new string[] { "Local Disk (F:)", "0.99 TB", "Local Disk", "357.37 GB" });
	ListViewDataItem listViewDataItem8 = new ListViewDataItem("DVD/CD-RW Drive (G:)", new string[] { "DVD/CD-RW (G:)", "4.7 GB", "DVD Drive", "0 KB" });
	ListViewDataItem listViewDataItem9 = new ListViewDataItem("CD-RW Drive (H:)", new string[] { "CD-RW (G:)", "", "CD Drive" });
 
	listViewDataItem1.Group = listViewDataItemGroup1;
	listViewDataItem2.Group = listViewDataItemGroup1;
	listViewDataItem3.Group = listViewDataItemGroup3;
	listViewDataItem4.Group = listViewDataItemGroup2;
	listViewDataItem5.Group = listViewDataItemGroup2;
	listViewDataItem6.Group = listViewDataItemGroup2;
	listViewDataItem7.Group = listViewDataItemGroup2;
	listViewDataItem8.Group = listViewDataItemGroup3;
	listViewDataItem9.Group = listViewDataItemGroup3;*/

	items.Add(listViewDataItem1);
	items.Add(listViewDataItem2);
	items.Add(listViewDataItem3);
	items.Add(listViewDataItem4);
	items.Add(listViewDataItem5);
	items.Add(listViewDataItem6);
	items.Add(listViewDataItem7);
	items.Add(listViewDataItem8);
	items.Add(listViewDataItem9);
}

radListView.BeginUpdate();
try
{
	radListView.Items.AddRange(items.ToArray()); ;
}
finally
{
	radListView.EndUpdate();
}

radListView.Dock = DockStyle.Fill;
radListView.EnableCustomGrouping = true;
radListView.EnableSorting = true;
radListView.KeyboardSearchEnabled = true;
radListView.ItemSize = new System.Drawing.Size(200, 32);
radListView.ShowGroups = true;

this.SuspendLayout();

try
{
	this.Controls.Add(radListView);
}
finally
{
	this.ResumeLayout();
}

Workaround:
ListViewDataItemGroup listViewDataItemGroup1 = new ListViewDataItemGroup("Files Stored on This Computer");
ListViewDataItemGroup listViewDataItemGroup2 = new ListViewDataItemGroup("Hard Disk Drives");
ListViewDataItemGroup listViewDataItemGroup3 = new ListViewDataItemGroup("Devices with Removable Storage");

RadListSource<ListViewDataItem> source =
    listViewDataItemGroup1.Items
                          .GetType()
                          .GetProperty("InnerList", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)
                          .GetValue(listViewDataItemGroup1.Items, null) as RadListSource<ListViewDataItem>;
source.CollectionView.ChangeCurrentOnAdd = false;

source =
    listViewDataItemGroup1.Items
                          .GetType()
                          .GetProperty("InnerList", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)
                          .GetValue(listViewDataItemGroup2.Items, null) as RadListSource<ListViewDataItem>;
source.CollectionView.ChangeCurrentOnAdd = false;

source =
    listViewDataItemGroup1.Items
                          .GetType()
                          .GetProperty("InnerList", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)
                          .GetValue(listViewDataItemGroup3.Items, null) as RadListSource<ListViewDataItem>;
source.CollectionView.ChangeCurrentOnAdd = false;
Completed
Last Updated: 27 Jan 2015 13:06 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    this.radListView1.AllowDragDrop = true;
    this.radListView1.ViewType = ListViewType.DetailsView;
    this.radListView1.ItemSize = new System.Drawing.Size(120, 40);

    DataTable dt = new DataTable();
    dt.Columns.Add("Id", typeof(int));
    dt.Columns.Add("Name", typeof(string));
    dt.Columns.Add("Image", typeof(Image));
    for (int i = 0; i < 3; i++)
    {
        dt.Rows.Add(i, "Item" + i, Properties.Resources._2RibbonMenuOpen2);
    }
    foreach (DataRow row in dt.Rows)
    {
        ListViewDataItem di = new ListViewDataItem();
        di.DataBoundItem = row;
        this.radListView1.Items.Add(di);
    }
}

private void radListView1_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e)
{
    e.VisualItem = new CustomItem();
}

public class CustomItem : DetailListViewVisualItem
{
    private DockLayoutPanel panel;
    private LightVisualElement imageElement;
    private LightVisualElement titleElement;

    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(DetailListViewVisualItem);
        }
    }

    protected override void CreateChildElements()
    {
        base.CreateChildElements();

        panel = new DockLayoutPanel();
        this.Children.Add(panel);
       
        imageElement = new LightVisualElement();
        imageElement.Size = new System.Drawing.Size(25, 40);
        panel.Children.Add(imageElement);
        DockLayoutPanel.SetDock(imageElement, Telerik.WinControls.Layouts.Dock.Left);
        
        titleElement = new LightVisualElement();
        panel.Children.Add(titleElement);
        titleElement.Size = new System.Drawing.Size(55, 40);

        titleElement.ShouldHandleMouseInput = false;

        DockLayoutPanel.SetDock(titleElement, Telerik.WinControls.Layouts.Dock.Right);
    }

    protected override SizeF MeasureOverride(SizeF availableSize)
    {
        SizeF measuredSize = base.MeasureOverride(availableSize);
        this.panel.Measure(measuredSize);
        return measuredSize;
    }

    protected override SizeF ArrangeOverride(SizeF finalSize)
    {
        base.ArrangeOverride(finalSize);
        this.panel.Arrange(new RectangleF(PointF.Empty, finalSize));

        return finalSize;
    }

    protected override void SynchronizeProperties()
    {
        base.SynchronizeProperties();
        this.Text = string.Empty;
        DataRow row = this.Data.DataBoundItem as DataRow;
        if (dataItem != null)
        {
            this.imageElement.Image = row["Image"] as Image;
            this.titleElement.Text = row["Name"].ToString();
        }
    }
}


Workaround:

 this.radListView1.ListViewElement.DragDropService = new CustomService(this.radListView1.ListViewElement);

public class CustomService : ListViewDragDropService
{ 
    public CustomService(RadListViewElement owner) : base(owner)
    {
    }

    protected override void UpdateDragHintLocation(Point mousePosition)
    {
        FieldInfo fi = typeof(ListViewDragDropService).GetField("dragHintWindow", System.Reflection.BindingFlags.Instance
            | System.Reflection.BindingFlags.NonPublic);
        if (fi != null)
        {
            RadLayeredWindow dragHintWindow = fi.GetValue(this) as RadLayeredWindow;
            if (dragHintWindow == null)
            {
                return;
            }
        }
        base.UpdateDragHintLocation(mousePosition);
    }
}
Completed
Last Updated: 20 Jan 2015 12:32 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category:
Type: Bug Report
1
To reproduce: add several items in RadListView and set the AllowDragDrop property to true. When you perform dragging over items, the drop hint is not displayed.
Completed
Last Updated: 07 Jan 2015 15:43 by ADMIN
To reproduce:

BindingList<Item> items = new BindingList<Item>();
public Form1()
{
    InitializeComponent();

       
    for (int i = 0; i < 30; i++)
    {
        items.Add(new Item(Guid.NewGuid().ToString(),
            "Item" + i,i % 2 == 0,DateTime.Now.AddDays(i)));
    }
    this.listBox1.DataSource = items;
    this.listBox1.DisplayMember = "Title";

       this.radListView1.DataSource = items;
    this.radListView1.DisplayMember = "Title";
}

  
public class Item
{
    public string UniqueId { get; set; }

    public string Title { get; set; }

    public bool IsActive { get; set; }

    public DateTime CreatedOn { get; set; }

    public Item(string uniqueId, string title, 
        bool isActive, DateTime createdOn)
    {
        this.UniqueId = uniqueId;
        this.Title = title;
        this.IsActive = isActive;
        this.CreatedOn = createdOn;
    }
}

private void radButton1_Click(object sender, EventArgs e)
{
     var temp = items[3];
    items[3] = items[4];        
    items[4] = temp;
}
Completed
Last Updated: 24 Dec 2014 14:13 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();
    this.radListView1.AllowDragDrop = true;
    for (int i = 0; i < 3; i++)
    {
        this.radListView1.Items.Add("Item" + i);
    }

    this.radListView1.ListViewElement.DragDropService.Started += DragDropService_Started;
    this.radListView1.ListViewElement.DragDropService.Stopped += DragDropService_Stopped;
}

private void DragDropService_Stopped(object sender, EventArgs e)
{
    Console.WriteLine("Stopped " + this.radListView1.SelectedIndex);
}

private void DragDropService_Started(object sender, EventArgs e)
{
    Console.WriteLine("Started " + this.radListView1.SelectedIndex);
}

Drag an item and drop it on a new position. As a result the SelectedIndexChanged event is fired and the new index is -1. There is no selected item in the RadListView.

Workaround: use a custom RadListView.ListViewElement.DragDropService and set the SelectedItem property to be equal to the CurrentItem when the drop operation is completed.

public class CustomService : ListViewDragDropService
{
    public CustomService(RadListViewElement owner) : base(owner)
    {
    }

    protected override void OnPreviewDragDrop(Telerik.WinControls.RadDropEventArgs e)
    {
        base.OnPreviewDragDrop(e);
        this.Owner.SelectedItem = this.Owner.CurrentItem;
    }
}
Declined
Last Updated: 26 Nov 2014 15:53 by ADMIN
Version Q3 2014 WinForms RadListView generates duplicate ItemMouseDoubleClick events when ViewType is set to DetailsView. 

See attached demo project.
Completed
Last Updated: 13 Nov 2014 10:35 by ADMIN
A bug has been introduced in the RadListView control in one of the newer releases: When the control is set to DetailsView the ItemMouseDoubleClick-even will always fire twice. This is not the case when the RadListView has the ListView or IconsView ViewType.

To repoduce the bug: Create a new project with a new form, add a RadListView and a few items to the ListView, set ViewMode to DetailsView, add the event and marvel at the event firing twice.
Completed
Last Updated: 05 Nov 2014 12:50 by ADMIN
To reproduce:
- Use the following code to populate the RadCheckedDropDownList http://www.telerik.com/help/winforms/dropdown-and-listcontrol-checkeddropdownlist-databinding.html
- Subscribe to the ItemCheckedChanged event.
- Change the item checked state.

Workaround: 
Add two variables: 
static bool isSync = false; 
bool cancel = false; 

Create custom RadCheckedListVisualItem using the following code snippet: 
class MyVisualItem : RadCheckedListVisualItem
{
    protected override void SynchronizeProperties()
    {
        isSync = true;
        base.SynchronizeProperties();
        isSync = false;
    }
}

Subscribe to CreatingVisualListItem event and set: 
        void radCheckedDropDownList1_CreatingVisualListItem(object sender, Telerik.WinControls.UI.CreatingVisualListItemEventArgs args)
        {
            args.VisualItem = new MyVisualItem();
        }
		
Subscribe to ItemCheckedChanging event and set: 
void radCheckedDropDownList1_ItemCheckedChanging(object sender, Telerik.WinControls.UI.RadCheckedListDataItemCancelEventArgs e)
{
    e.Cancel = cancel;
    cancel = true;

    if (isSync)
    {
        return;
    }
}

Subscribe to ItemCheckedChanged event and set: 
void radCheckedDropDownList1_ItemCheckedChanged(object sender, Telerik.WinControls.UI.RadCheckedListDataItemEventArgs e)
{
    cancel = false;

    if (isSync)
    {
        return;
    }
}
Completed
Last Updated: 24 Oct 2014 07:04 by ADMIN
To reproduce:
public Form1()
{
    InitializeComponent();
    this.radListView1.ViewType = Telerik.WinControls.UI.ListViewType.IconsView;
}

private void Form1_Load(object sender, EventArgs e)
{   
    radListView1.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;
    radListView1.Items.Add("Item 1");
    radListView1.Items.Add("Item 2");
    radListView1.Items.Add("Item 3");
    radListView1.Items.Add("Item 4");  
}

Workaround: set the ListViewElement.ViewElement.Orientation property to Horizontal in the form's constructor.
Completed
Last Updated: 20 Oct 2014 14:00 by ADMIN
Completed
Last Updated: 15 Oct 2014 14:14 by ADMIN
To reproduce: add a RadListView, an ImageList (with two images: e.g. "crop.png" and "save.png") and a RadDropDownList. Use the following code snippet:

public Form1()
{
    InitializeComponent();

    this.radDropDownList1.DataSource = Enum.GetValues(typeof(ListViewType));

    this.radListView1.ImageList = this.imageList1;
    this.radListView1.SmallImageList = this.imageList1;

    this.radListView1.Columns.Add("Column1");
    string imageKey = string.Empty;
    for (int i = 0; i < 5; i++)
    {
        this.radListView1.Items.Add("Item" + i);
        if (i % 2 == 0)
        {
            imageKey = "crop.png";
        }
        else
        {
            imageKey = "save.png";
        }
        this.radListView1.Items.Last().ImageKey = imageKey;
        this.radListView1.Items.Last()["Column1"] = this.radListView1.Items.Last().Text;
    }
}

private void radDropDownList1_SelectedValueChanged(object sender, EventArgs e)
{
    if (this.radDropDownList1.SelectedValue != null)
    {
        this.radListView1.ViewType = (ListViewType)this.radDropDownList1.SelectedValue;
    }
}

Initially, we will see the image displayed for each item. However, when you change to DetailsView, the image is not displayed.

Workaround:  use the RadListView.CellFormatting event and set CellElement.Image property for the cells in the first column.
Declined
Last Updated: 15 Oct 2014 07:23 by ADMIN
Steps to reproduce.

1. Add a RadListView to a form and set its height to around 68.
2. Set the ViewType to ViewType.Details.
3. Add several items so the vertical scroll bar would show.
4. scroll to the bottom and use the scroll bar up button to scroll up.

You will see that only half of some items would be shown, until you reach the top.

Resolution: When available space for rows is less than the height of a single row is normal to not see the hole row. 
Completed
Last Updated: 08 Oct 2014 15:56 by ADMIN
To reproduce: use the following code snippet:

this.radListView1.ViewType = ListViewType.DetailsView;
this.radListView1.Columns.Add("Column0");
this.radListView1.Columns.Add("Column1");

for (int i = 0; i < 3; i++)
{
    ListViewDataItem item = new ListViewDataItem();
    radListView1.Items.Add(item);

    item[0] = "data." + i + ".0";
    item[1] = "data." + i + ".1";
}

After resizing a column, click over a data cell. You will notice that the default cursor is changed.

Workaround: use the MouseUp event:

private void radListView1_MouseUp(object sender, MouseEventArgs e)
{
    if (e.Button == System.Windows.Forms.MouseButtons.Left)
    {
        DetailListViewDataCellElement dataCell = radListView1.ElementTree.GetElementAtPoint(e.Location)as DetailListViewDataCellElement;
        if (dataCell != null)
        {
            radListView1.Cursor = Cursors.Default;
        }
    }
}
Completed
Last Updated: 08 Oct 2014 14:30 by ADMIN
To reproduce: follow the approach demonstrated in ListView >> Getting started help article http://www.telerik.com/help/winforms/listview-getting-started.html . When you change to DetailsView no image is displayed in the first column next to the cell's text. All previous versions (previous than 2014.2 715) shows an image in the first cell.

Workaround: use the RadListView.CellFormatting event and set CellElement.Image property for the cells in the first column.

private void radListView1_CellFormatting(object sender, ListViewCellFormattingEventArgs e)
{
    DetailListViewDataCellElement cell = e.CellElement as DetailListViewDataCellElement;
    if (cell != null)
    {
        e.CellElement.Image = cell.Row.Image;
        
    }
}
Completed
Last Updated: 08 Oct 2014 14:18 by ADMIN
To reproduce:
- Add listview bound to a datatable that has 100 items to a blank form.
- Change the listview datasource to one   that has 5 items (scroll to the bottom first). 

Workaround:
 radListView1.ListViewElement.ViewElement.VScrollBar.Value = 0;
Completed
Last Updated: 08 Oct 2014 11:09 by ADMIN
WORKAROUND:
radListView1.Groups[0].PropertyChanged += Form1_PropertyChanged;
..............
 void Form1_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "Expanded")
     {
         ListViewDataItemGroup group = (ListViewDataItemGroup)sender;
 
         RadMessageBox.Show(group.Text + " is expanded = " + group.Expanded);
     }
 }
Completed
Last Updated: 05 Aug 2014 10:50 by ADMIN
To reproduce: use the following code snippet:
this.radListView1.ViewType = ListViewType.DetailsView;

ListViewDetailColumn col1 = new ListViewDetailColumn("Column0");
this.radListView1.Columns.Add(col1);
ListViewDetailColumn col2 = new ListViewDetailColumn("Column1");
this.radListView1.Columns.Add(col2);

for (int i = 0; i < 3; i++)
{
    ListViewDataItem item = new ListViewDataItem();
    radListView1.Items.Add(item);

    item[0] = "data." + i + ".0";
    item[1] = "data." + i + ".1";
}

On a RadButton.Click event set the ListViewDetailColumn.Visible property to false for some of the columns. As a result, the column is still visible. If you click over a cell, belonging to it, NullReferenceException is thrown.

Workaround: wrap setting the ListViewDetailColumn.Visible property to false in a BeginUpdate/EndUpdate block.
 
Completed
Last Updated: 22 Jul 2014 13:02 by ADMIN
To reproduce:

1. Add a RadListView and a RadButton
2. Bind the RadListView to a collection of custom objects
3. On RadButton.Click event clear the collection of custom objects or the RadListView.Items collection. As a result Items.Count = 0, but the SelectedItem is not null as expected.
Completed
Last Updated: 09 Jul 2014 08:48 by ADMIN
ADMIN
Created by: Ivan Todorov
Comments: 0
Category:
Type: Feature Request
6
Implement drag & drop functionality for items in RadListView in bound mode.

Resolution: Drag and Drop functionality for bound RadListView can be achieved following the approach in the referred help article: http://www.telerik.com/help/winforms/listview-drag-and-drop-drag-and-drop-in-bound-mode.html