We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridForeignColumn sorting


I have a problem with the GridForeignColumn when I use sort. the column sort by Id (ForeignKeyField) instead of its name (ForeignKeyValue). Is it possible to sort by the ForeignKeyValue?

Syncfusion Version 20.1.57.

Thanks for the support and have a nice day

3 Replies

PS Prathap Senthil Syncfusion Team February 9, 2023 01:17 PM UTC

Hi Anthony

Greetings from Syncfusion support

We understand that you would like to sort data based on the ForeignKey value, instead of the ForeignKey field. Currently, our platform supports the sorting of local data based on the ForeignKey value through the custom sort feature. If you are using local data, you can achieve your requirement using the custom sort feature, Kindly refer to the below documentation for your reference.


Or If you are using Remote Data, Currently we don’t have support for remote data sorting in this manner. We will consider this as an opportunity for improvement in the ForeignKey adapter.

We have considered it as a usability improvement and logged a task “Need to provide support for ForeignKey Adaptor in Blazor Grid”. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. And this improvement will be included in any of our upcoming releases.

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.


You can also communicate with us regarding the open feature at any time using our above feedback report page. We do not have an immediate plan to implement this feature and it will be included in any of our upcoming releases. Please cast your vote to make it count. So that we will prioritize the improvement for every release based on demands.

Prathap S

AB Anthony Benoit February 9, 2023 01:27 PM UTC

Thanks for the reply,

Is it possible to sort the list in alphabetical order with the custom sort if it's not the primary key?

if yes do you have an example ?

Thanks, have a good day !

PS Prathap Senthil Syncfusion Team February 13, 2023 02:11 PM UTC

Query: Is it possible to sort the list in alphabetical order with the custom sort if it's not the primary key?”

Thanks for the update,

Local data is used by default in the grid's foreign-key value based on sorting. Please refer to the attached sample and screenshot for your reference f. Please let us know if you have any additional requirements, and we will proceed accordingly. 

Graphical user interface, application

Description automatically generated

Attachment: Datagrid_3064b5d8.zip

Live Chat Icon For mobile
Up arrow icon