My grid fields won’t sort – solved

Just a quick note on a problem I just worked around.

My grid fields wouldn’t sort. You click the gray heading bar, and they pretend they sort, but they don’t.

My main form data source was table A. I also had table B joining to A, table C joining to B, and table D joining to C. The grid datasource was A. Only the fields in the grid which were from datasource A would sort – and it took me a while to realize this, because I’m not really displaying fields from that table.

Once I figured out they must be on A to sort, I tried putting methods on table A to retrieve the data from B, C, D – but those didn’t sort either. Had to actually be fields. (Hm, I wonder if methods on the datasource would work?)

Not a big deal to me to add fields, since A is a temp table. But I can see this being problematic in other situations. I welcome input.

Happy DAXing!

About janeteblake

Dynamics AX developer
This entry was posted in AX2012, Dynamics AX. Bookmark the permalink.

2 Responses to My grid fields won’t sort – solved

  1. Nick says:

    Hi there,

    Your findings are consistent with all versions of Dynamics AX/Axapta – display fields cannot be filtered/sorted: The solution is to replace the display method with inner joined table – you can use a temporary table on any existing datasource to achieve this, or add the field to the table itself of course.

  2. janeteblake says:

    Thank you very much, Nick!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s