IRowFilter behaves differently since version 3.5

Technote (FAQ)


Why is the output different when using IRowFilter since version 3.5 ?


Starting in version 3.5, after the rows are filtered, they are also sorted.


You can override this behavior by sorting the rows each time the tree model changes.

For instance in the DragDrop sample, available in IBM ILOG Gantt .NET distribution, add the following before setting the RowFilter on each scheduleChart to force the rows to be sorted by Name.


TreeModelView mView1 = scheduleChart1.GanttTable.TreeModelView;
mView1.TreeModelChanged += new TreeModelChangeEventHandler(mView_TreeModelChanged);
TreeModelView mView2 = scheduleChart2.GanttTable.TreeModelView;
mView2.TreeModelChanged += new TreeModelChangeEventHandler(mView_TreeModelChanged);

And the mView_TreeModelChanged method is the following:

bool sorting = false; // this is needed to avoid infinite loop as SortRows

// method will fire TreeModelChanged event.

void mView_TreeModelChanged(object sender, TreeModelChangeEventArgs e)


if (!sorting)


sorting = true;

((TreeModelView)sender).SortRows(null, "Name", true, -1);



sorting = false;


Document information

More support for:

IBM ILOG Gantt for .NET

Software version:

3.5, 4.0

Operating system(s):


Reference #:


Modified date:


Translate my page

Content navigation