• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Filter and Sort your tasks in TMS FNC Gantt Chart

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,480
Баллы
155
When working with large projects, finding the right tasks in a Gantt Chart can be challenging. Without the right tools, it can be difficult to focus on what matters most. Thats why the

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

introduces two powerful features:

Together, these features give you full control over how tasks are displayed.

Task Filtering

At the core of filtering is the

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

logic in theTTMSFNCGanttChartFilter class. It allows you to build filter expressions programmatically. You can add simple or complex conditions, combine them with AND and OR.



Building Filters



To use filtering, your refer to the different property names that are used for the columns to automatically fill in the Gantt Chart List and these are: wbs, taskname, taskdescription, startdate, enddate, duration, statename, progress, cost, dependencies, datastring, datainteger, databoolean.


begin
TMSFNCGanttChart.Filter.AddAND('taskname', feoStartsWith, 'D');
TMSFNCGanttChart.Filter.AddAND('progress', feoSmallerThan, 50);
end;
Another way is to set the filter via

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

:

begin
// Default format: TMSFNCGanttChart1.Filter.FormatType := fftDelphiDataSet;
TMSFNCGanttChart1.Filter.Parse('[taskname] LIKE ''D%'' AND [progress] < 50');

TMSFNCGanttChart1.Filter.FormatType := fftUniversalFilterExpressions;
TMSFNCGanttChart1.Filter.Parse('[taskname] = "D*" & [progress] < 50');
end;
Managing Filters


You can quickly reset a filter with the Clear procedure.

It is easy to check whether you are already filtering on a given property with the HasFilter function, and to clear all of the expressions that are using a given property name via RemovePropertyFilter.

Filter Hierarchy Mode


Filtering also defines how the hierarchy around filtered tasks is displayed. For this, we use the FilterHierarchyMode property:

ModeDescription
gfhParentShows matching tasks and their parents, keeping the full context. (Default value.)
gfhChildrenShows matching tasks and all of their children (subtree).
gfhBothA combination of Parent and Children.
gfhStrictShows only the tasks that match the filter.

Visual examples for tasks starting with "D":

Parent Hierachy:

TMS Software Delphi  Components tmsfncganttchart


Children Hierarchy:

TMS Software Delphi  Components tmsfncganttchart


Both Hierarchy:


TMS Software Delphi  Components tmsfncganttchart


Strict Hierarchy:

TMS Software Delphi  Components tmsfncganttchart

Task Sorting


You can also sort tasks. This is done on a project level. And changes the position of the tasks in the collection.
The sorting works with the property names, in the same way as the filtering and column names. (wbs, taskname, taskdescription, startdate, enddate, duration, statename, progress, cost, dependencies, datastring, datainteger, databoolean.)

The sorting can be enabled on the Column property of the Gantt Chart which will trigger when clicking on the header of the Gantt List Column. Or programmatically with the sort method.


GanttChart.Project.Sort(
'wbs', // Property to sort on
True, // Recurse into subtasks
True, // Case-sensitive
True // Ascending order
);
(💡 When sorting tasks, the custom WBSPart will be filled with the current index to ensure that the data is displayed as expected.)
Conclusion


The

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

now provides a rich set of tools for filtering and sorting tasks. Whether you want to zoom in on specific conditions, maintain context with parents or children, or reorder tasks by date, name, or WBS you are in full control of how project data is presented.

With these features combined, managing even the most complex projects becomes intuitive and efficient.



Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу