How to sort GridImageColumn

Hi,

I am using SfDataGrid for displaying data. It consist of multiple GridTextColumn and one GridImageColumn. Among all these columns, only the GridImageColumn does not perform sorting even though Allow Sorting property is set to true. Nothing happens when clicking the column header. Sorting icon doesn't display either. Is it possible to sort this type of column? If so, how?

Thanks. 

9 Replies

SK Shivagurunathan Kamalakannan Syncfusion Team February 12, 2018 04:51 PM UTC

Hi Krystille, 
 
Thanks for contacting Syncfusion Support, 
 
We have checked your query. Sorting cannot be made based on the images in SfDataGrid. Currently we do provide support for Sorting of images in GridImageColumn. 
 
Other columns like : GridTextColumn 
                                 GridNumericColumn 
                                 GridDateTimeColumn 
                                 GridTemplateColumn 
                                 GridSwitchColumn 
                                 GridPickerColumn can be sorted based on your requirement. 
 
Regards, 
Shivagurunathan. K 



SW SweetNerdyGirl February 13, 2018 12:26 AM UTC

Can you give as an example for Sorting of images in GridImageColumn that you currently supported? Thank you.


SK Shivagurunathan Kamalakannan Syncfusion Team February 13, 2018 03:48 AM UTC

Hi Krystille, 
 
Thanks for contacting Syncfusion Support, 
 
We have checked your query. Sorry for the inconvenience caused.  
Sorting cannot be made based on the images in SfDataGrid. Currently we do not provide support for Sorting of images in GridImageColumn. 
 
Regards, 
Shivagurunathan. K 



JC Joseph Canada February 14, 2018 02:06 AM UTC

Hi,

I just saw this thread and it seems we do have same requirements on our app.

Per your response, you mentioned that it is not yet supported.

However, is there a way that this functionality can be implemented? A hack something like that for us to be able to sort of GridImageCell?

Thank you.


SK Shivagurunathan Kamalakannan Syncfusion Team February 14, 2018 05:23 PM UTC

Hi Joseph 
 
Thanks for contacting Syncfusion Support, 
 
We have checked your query. 
The images cannot be sorted in SfDataGrid. GridImageColumn does not support for sorting of images. 
 
Regards, 
Shivagurunathan. K 



TS Truth Seeker March 26, 2020 04:09 AM UTC

Hi, I know this is an old thread, but in case you encounter it through a search as I did, here is a workaround:
Create two columns: one GridImageColumn followed by a GridTextColumn, the first one display the image based on the MappingName of the second column, then do you regular sorting on the second column. 



KK Karthikraja Kalaimani Syncfusion Team March 26, 2020 01:50 PM UTC

Hi Truth,

We glad to know that your requirement has resolved at your end, we also consider this case with our development about this. 

Regards,
Karthik Raja
 



SK Sachin Kanadia May 11, 2020 10:24 PM UTC

Hi There,

Can this not be achieved through custom sorting? I need to be able to sort a column that currently displays an image.

I'm currently following the documentation for custom sorting and its not working. I think its because I'm sorting on an Image Column but the documentation should make it clear that this is not possible.

If this is not supported then please could someone provide an estimate of how long it will take for it to be implemented into a subsequent release.

Many Thanks


KK Karthikraja Kalaimani Syncfusion Team May 12, 2020 12:28 PM UTC

Hi Sachin,

As we said earlier GridImageColumn cannot be sorted. So, how you expect the image column to be sorted on what aspect sorting should happen? if you explain clearly it would be easy for us to define the feature and analyze feasibility or workaround.

Regards,
Karthik Raja
 


Loader.
Up arrow icon