# Sort on the Gantt differs from the sort on a table

**URL:** <https://community.appfarm.io/t/sort-on-the-gantt-differs-from-the-sort-on-a-table/194>\
**Category:** Bug reports\
**Tags:** ui\
**Created:** [January 17, 2023, 1:51pm UTC](https://community.appfarm.io/t/sort-on-the-gantt-differs-from-the-sort-on-a-table/194 "2023-01-17T13:51:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lequeuxa](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/lequeuxa/32/128_2.png) [@lequeuxa](https://community.appfarm.io/u/lequeuxa)\
**Post date:** [January 17, 2023, 1:51pm UTC](https://community.appfarm.io/t/sort-on-the-gantt-differs-from-the-sort-on-a-table/194/1 "2023-01-17T13:51:19Z")

</div>

Hi,

It seems like sort on the gantt does not work in my solution “'jerouville”, can someone have a look?

 ![sort gantt](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/79bdc0650061ab54856d56ab901076c1e001a884.png)

Thanks

---

<div class="post-metadata">

**Author:** ![lequeuxa](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/lequeuxa/32/128_2.png) [@lequeuxa](https://community.appfarm.io/u/lequeuxa)\
**Post date:** [January 17, 2023, 1:53pm UTC](https://community.appfarm.io/t/sort-on-the-gantt-differs-from-the-sort-on-a-table/194/2 "2023-01-17T13:53:39Z")

</div>

Items should be ordered by order numbers like here:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/bc23c46bb26d2c42291aca392ad53edeedd11a43.png)

---

<div class="post-metadata">

**Author:** ![nejrabrc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/nejrabrc/32/131_2.png) [@nejrabrc](https://community.appfarm.io/u/nejrabrc)\
**Post date:** [January 18, 2023, 3:43pm UTC](https://community.appfarm.io/t/sort-on-the-gantt-differs-from-the-sort-on-a-table/194/3 "2023-01-18T15:43:34Z")

</div>

Hi @lequeuxa 🙂 I set up the same case and it did not work. Forwarded to the dev team, so if this turns out to be a bug, we will register a challenge on it!

---

<div class="post-metadata">

**Author:** ![nejrabrc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/nejrabrc/32/131_2.png) [@nejrabrc](https://community.appfarm.io/u/nejrabrc)\
**Post date:** [January 18, 2023, 4:20pm UTC](https://community.appfarm.io/t/sort-on-the-gantt-differs-from-the-sort-on-a-table/194/4 "2023-01-18T16:20:14Z")

</div>

Hello again @lequeuxa 🙂

I have found out that sorting a data source, when you also have _Grouping_ set up based on a parent of that data source, is not possible on the Gantt chart directly, since you are trying to sort items of a child object that you have grouped under a parent, and the parent object is not sorted itself. So, in such cases, you need to sort the parent object (Grouping Data Source) first, either in an action using “Sort objects” (if it is a runtime-only data source) or directly on the object in App Data (DB connected), and then your main(child) data source items will be sorted.

This is now fixed in your solution for the view shown up here.

---

<div class="post-metadata">

**Author:** ![lequeuxa](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/lequeuxa/32/128_2.png) [@lequeuxa](https://community.appfarm.io/u/lequeuxa)\
**Post date:** [January 20, 2023, 8:13am UTC](https://community.appfarm.io/t/sort-on-the-gantt-differs-from-the-sort-on-a-table/194/5 "2023-01-20T08:13:14Z")

</div>

Working now, thanks a lot!
