Hello
How to order the tasks in winganttview after loading from SQL database?
Regards
Essna
Hello,
I am just checking about the progress of this issue. Let me know If you need any further assistance on this issue?
Thank you for using Infragistics Components.
I have had this issue as well when I have used my GUID as my Primary Key for my table. By default SQL queries will use this PID as the sort field. Since these GUID's are sorted like a string value they end up coming in all over the place. I added an auto-increment field and restructured my queries to sort by this number. It solved all my problems.
Hello,
In order to reproduce this issue I’ve created the attached sample, where instead of SQL server I am using Local Database (so I have connection string, data adapters and everything needed to connect to SQL server). Also I’ve captured small video of how this works on my machine. So you are able to see what I am doing and could let me know if I am missing something.
Please notice that when I am creating new task, I’m right clicking on the empty area of grid part of the GanttView. If I right click on an existing task, the new added task will appears above the clicked task in the GanttView, and it will be recorder in the database at the bottom of the DataTable. So next time when I run the application tasks will appears in the same order as they comes from the database, and this will be different of those which we saw in the GanttView before. We cannot change this since DataTable object doesn’t support InsertAt(index) method and the only way to add new row is on the bottom of the DataTable object. If this is your issue then I suggest you to add a column in your data base which will holds position on which task must be initially displayed , and when you retrieve your data to order your records on this column.
Please let me know if you have any further questions or if I am missing something.
Dimitar,
Obviously you are not able to help me. The problem is not in the version. You could reproduce it with your new version 13.2. Will be better if you read your own documentation, how to bind calendarInfo http://help.infragistics.com/Help/Doc/WinForms/2013.1/CLR4.0/html/WinGanttView_DataBinding_Support_for_WinGanttView.html
I am disappointed by your sample. Your table doesn't have a primary/unique key and will be very interesting for me to see how you will update and delete specific task. Do not feel obliged to answer, I found solution of my problem.
-Essna
Hello Essna,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue.