Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
480
Can not seem to make an UltraTree column in fully expand
posted

I have a BindingList of Record set as the data source of an UltraTree.  Record can contain a child list of Records forming an object tree. 

There are two user visible fields on each Record, RecordType and VeryLongString.   I would like the column of VeryLongString to alway fill the the available space. As much text of the string should be displayed.  I have set Docking to Fill, used the  OutlookExpress and other settings that seemed to have been suggested in this forum in the past.  But I still am not getting the effect I want,  the column is not filling the control area and then the data in VeryLongString gets trimmed and I only see ... for some of the data even through there is plenty of horizontal space.   I tried turning TextTrimming to None but the trim still happens.   Rougly here is what I am doing

What to I have to do to make VeryLongString column fill all available space and for the TextTrim NOT to happen. 

enum RecordType
{
// type values
}

public class Record
{

public RecordType RecordType
{
get;

}

public String VeryLongString
{
get;
}


public BindingList<Record> Records
{
get { return ... // tree of child records
}
}


//construct control
....

ultraTree1 = new Infragistics.Win.UltraWinTree.UltraTree();
ultraTree1.Override.ShowExpansionIndicator = Infragistics.Win.UltraWinTree.ShowExpansionIndicator.CheckOnDisplay;
ultraTree1.Dock = DockStyle.Fill;
ultraTree1.ViewStyle = Infragistics.Win.UltraWinTree.ViewStyle.OutlookExpress;
ultraTree1.ColumnSetGenerated += ultraTree1_ColumnSetGenerated;
ultraTree1.ColumnSettings.AutoGenerateColumnSets = true;
ultraTree1.Appearance.TextTrimming = Infragistics.Win.TextTrimming.None;
this.view_panel.Controls.Add(ultraTree1);

BindingList<Record> data = ...

ultraTree1.DataSource = data;

void ultraTree1_ColumnSetGenerated(object sender, Infragistics.Win.UltraWinTree.ColumnSetGeneratedEventArgs e)
{

for (int i = 0; i < e.ColumnSet.Columns.Count; i++)
{
Infragistics.Win.UltraWinTree.UltraTreeNodeColumn column = e.ColumnSet.Columns[i];
string s = column.Key;
if (column.Key == "RecordType")
{
column.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Disabled;
column.AutoSizeMode = Infragistics.Win.UltraWinTree.ColumnAutoSizeMode.None;
column.LayoutInfo.PreferredLabelSize = new System.Drawing.Size(80, 20);
column.LayoutInfo.PreferredCellSize = new System.Drawing.Size(80, 20);

}
else if (column.Key == "VeryLongString")
{

pathColumns.Add(column);
column.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full;
column.AutoSizeMode = Infragistics.Win.UltraWinTree.ColumnAutoSizeMode.AllNodesWithDescendants;
column.LayoutInfo.AllowLabelSizing = Infragistics.Win.UltraWinTree.LayoutSizing.Horizontal;
column.PerformAutoResize();
}

}
}