Hello JSW W.,
To display "..." when there is no data you can check for String.Empty and set Value of the subitem to "...".
You are saying that when you click on the header column your application was shutting down. Could you post an example application that demonstrate it because we can't reproduce it.
To disable column sorting you can attach to ColumnNotify event and in the event handler you should check the event argument's NotifyCode property whether is ColumnSortingNotifyCode, and if so you can set the event argument Cancel to true:
void nTreeList1_ColumnNotify(object sender, NTreeListColumnNotifyData data)
{
if (data.NotifyCode == NTreeList.ColumnSortingNotifyCode)
{
data.Cancel = true;
}
}
If you want to be able to change the state of the NTreeListNodeBooleanSubItem you need to know its index in the node that host it.
You can attach to MouseClick event and in the event handler you can change its state
Let say that the 3rd column in your NTreeList contains NTreeListNodeBooleanSubItems, then your MouseClick event handler should look similar to this:
void nTreeList1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
NTreeListNode node = (NTreeListNode)nTreeList1.ItemFromPoint(new NPoint(e.Location));
if (node == null)
return;
NTreeListNodeBooleanSubItem item = ((NTreeListNodeBooleanSubItem)node.SubItems[2]);
if (item == null)
return;
item.Value = !item.Value;
}
}
The drawback here is that the check state will change if you click on any of the subitmes that belongs to this node.
Best Regards,
Nevron Support Team