how to


Author
Message
Suyan Dong
Suyan Dong
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 17, Visits: 128
Hi:
     When using the NTreeList control, I add NTreeListNode with subitems, I set the column's sortable to be false. But it can still sort?
could you please show me how to set it to NotSortble.
    Here is my code:
    NTreeListColumn col;
    col = new NTreeListColumn();
    col.Name = "Project";
    col.Header.Text = "Project";
    col.Sortable = false;
   
    m_List.Columns.Add(col);

Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.1K
Hello Suyan Dong,

You should attach to ColumnNotify event and cancel it when NotifyCode is ColumnSortingNotifyCode for the desired column:


nTreeList1.ColumnNotify += nTreeList1_ColumnNotify;
...

void nTreeList1_ColumnNotify(object sender, NTreeListColumnNotifyData data)
{
    if (data.Column == nTreeList1.Columns["Project"] && data.NotifyCode == NTreeList.ColumnSortingNotifyCode)
    {
        data.Cancel = true;
    }
}




Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!

Login

Explore
Messages
Mentions
Search