Completed
Last Updated: 02 Jun 2014 12:28 by Chris Ward
ADMIN
George
Created on: 02 May 2014 13:27
Category:
Type: Bug Report
0
FIX. RadListView - Settings FullRowSelect - false, ShowCheckBoxes - true and AllowArbitraryitemHeight - true in IconsView causes the text to be cut off on some items
To reproduce: Add a RadListVIew to a Form  with the following properties:

this.ListView.ItemSize = new System.Drawing.Size(200, 25);
this.ListView.FullRowSelect = false;
this.ListView.AllowArbitraryItemHeight = true;
this.ListView.ShowCheckBoxes = true;
this.ListView.ViewType = Telerik.WinControls.UI.ListViewType.IconsView;


Add the following items as follows:

string[] counters = new string[]{
    "ATMEL BIRCH [XFC]Read IOs/Sec - Avg",
    "ATMEL ELM [XFC]Read IOs/Sec - Avg",
    "ATMEL OAK [XFC]Read IOs/Sec - Avg",
    "ATMEL POPLAR [XFC]Read IOs/Sec - Avg",
    "ATMEL WALNUT [XFC]Read IOs/Sec - Avg"
};

When you start the application you will notice that some items are wrapped and some have their text cut off.

Workaround:

Subscribe to the VisualItemFormatting event and set FitToSizeMode to FitToParentPadding and Padding to 5:

void CounterList_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
{
    e.VisualItem.Padding = new Padding(5);
    e.VisualItem.FitToSizeMode = Telerik.WinControls.RadFitToSizeMode.FitToParentPadding;
}
2 comments
Chris Ward
Posted on: 05 May 2014 13:47
Woops, wrong code on clipboard. Try this:

private void CounterList_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
{
    e.VisualItem.Padding = new Padding(20, 0, 0, 0);
    e.VisualItem.ToggleElement.Margin = new Padding(-20, 0, 0, 0);
}
Chris Ward
Posted on: 05 May 2014 13:46
The suggested workaround did not work for me. However, the following code seems to fix the problem:

void CounterList_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
{
    e.VisualItem.Padding = new Padding(5);
    e.VisualItem.FitToSizeMode = Telerik.WinControls.RadFitToSizeMode.FitToParentPadding;
}