Hi,
I've got a simple listview with a datasource where i want to control the max width each column. However, I got some fields with a lot of text and therefore implemented TextWrap. The text is wraped fine, but the top of and the bottom of the text is cut off(see attached file). It seems that the itemheight needs to be set??? But where and how??
using 2014.1.226.40
I'm doing the following:
public void Initialize()
{
this.catalogListView.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
this.catalogListView.AllowArbitraryItemHeight = true;
this.catalogListView.GroupDescriptors.Add(new GroupDescriptor(new SortDescriptor[] { new SortDescriptor("type", ListSortDirection.Ascending) }));
this.catalogListView.EnableGrouping = true;
this.catalogListView.ShowGroups = true;
this.catalogListView.DataSource = DataManager.Instance.GetAllFunctions();
}
private void Catalog_Load(object sender, EventArgs e)
{
foreach (ListViewDetailColumn c in catalogListView.Columns)
{
c.MinWidth = 75;
c.MaxWidth = 200;
c.AutoSizeMode = ListViewBestFitColumnMode.AllCells;
c.BestFit();
}
}
private void catalogListView_CellCreating(object sender, ListViewCellElementCreatingEventArgs e)
{
e.CellElement.TextWrap = true;
}
I've got a simple listview with a datasource where i want to control the max width each column. However, I got some fields with a lot of text and therefore implemented TextWrap. The text is wraped fine, but the top of and the bottom of the text is cut off(see attached file). It seems that the itemheight needs to be set??? But where and how??
using 2014.1.226.40
I'm doing the following:
public void Initialize()
{
this.catalogListView.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
this.catalogListView.AllowArbitraryItemHeight = true;
this.catalogListView.GroupDescriptors.Add(new GroupDescriptor(new SortDescriptor[] { new SortDescriptor("type", ListSortDirection.Ascending) }));
this.catalogListView.EnableGrouping = true;
this.catalogListView.ShowGroups = true;
this.catalogListView.DataSource = DataManager.Instance.GetAllFunctions();
}
private void Catalog_Load(object sender, EventArgs e)
{
foreach (ListViewDetailColumn c in catalogListView.Columns)
{
c.MinWidth = 75;
c.MaxWidth = 200;
c.AutoSizeMode = ListViewBestFitColumnMode.AllCells;
c.BestFit();
}
}
private void catalogListView_CellCreating(object sender, ListViewCellElementCreatingEventArgs e)
{
e.CellElement.TextWrap = true;
}