Hi
I have an UltraTree (v12.2).
The ViewStyle is set to OutlookExpress to be able to get all the columns from the different levels properly aligned.
One of the column is a checkbox but I need to display the CheckBox only on rows of the first level (other level can leave the cell empty).
How can I achieve that?
Hi,
I don't think this is possible in OutlookExpress mode, because all of the levels have the same set of display columns. I think you might be able to hide the checkboxes and just show an empty cell on all of the child nodes, but I don't believe it's possible to remove the space.
An empty cell would be fine with me. How can I do it?
I don't set an editor, I only set the DataType to bool and the CheckBox is correctly displayed. Would it be easier if I would specify an editor?
I will try the CreationFilter on Monday.
Really? If I don't assign a CheckEditor to the column, it displays as "true" or "false" on mine.
Anyway, no - it doesn't matter whether you use an editor or not.
The CreationFilter does the trick. Thanks.
I just checked again and I don't have an editor. Here is my code (referencing v.12.2):
//set the ColumnSet UltraTreeColumnSet rootColumnSet = treeHeaders.ColumnSettings.RootColumnSet; rootColumnSet.AllowCellEdit = AllowCellEdit.Full; _columnSelected = rootColumnSet.Columns.Add("Selected"); _columnSelected.DataType = typeof (bool); _columnSelected.AllowCellEdit = AllowCellEdit.Full; _columnSelected.ButtonDisplayStyle = ButtonDisplayStyle.Always;
Any ideas why I sometimes see some ghost?
As shown on the attached image, only the purple line (level 0) should show a checkbox.
The ghosts appear here and there not always and the same place, sometimes after I do a ExpandAll, sometime when scrolling, ...
Hm, maybe those are leftover checkbox elements that are not getting removed. Right before you return true from the CreationFilter, add this:
parent.ChildElements.Clear();
Let me know if that doesn't help.
It seems that it does the job! Thanks again