Hello
How to order the tasks in winganttview after loading from SQL database?
Regards
Essna
Thank you for the answer, but I use DataBindingsForTasks to bind my winganttview to the SQL server. Also using SortedFields, is not possible to order the tasks by their original sequence. I want to create tasks in this order
- Task John
- Task Andrew
- Task Dave
Next time, when I load these three tasks from the server, I want to see the same order. Now the order is different each time. Is this a bug ? Please provide solution.
Thank you
Hello Essna,
The UltraGanttView will by default show its tasks in the order that they’ve been added to the Tasks collection of the UltraCalendarInfo of the gantt view. If that order is not the order you want you can change it using the SortedFields collection of the Tasks. For example the following line will sort the tasks based on their name in descending order:
ultraCalendarInfo1.Tasks.SortedFields.Add(SortableTaskField.Name, SortOrder.Descending);
If you want to know more about the sorting capabilities of the WinGanttView you should visit this link:
http://help.infragistics.com/NetAdvantage/WinForms/2013.1/CLR4.0/?page=WinGanttView_WinGanttView_Sorting.html
Please let me know if you have any additional questions.