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

How can i sort column with images

Hello, In a GDBG I have a column with images and the sort option doesn''t work on it. How can I sort it. Boaz.

1 Reply

AD Administrator Syncfusion Team December 2, 2004 10:33 AM

How are you getting the images to be displayed in thie column? Are you using a TextBox or Static CellType and setting style.ImangeIndex and style.ImageList somehow? Or are you using an Image CellType, or are you doing something else? Is this an unbound column where you are setting it values from QueryCellInfo or PrepareViewStyleInfo? By default, a GridDataBoundGrid sorts a column by using the DataView.Sort property on the DataView associated with the DaatSource of teh grid. If your column is unbound, this will not sort it. If your column is bound, I would expect that rows to be sorted by whatever value it is that your DataSource has in that column. If you want to sort an unbound column, then you will have to use some kind of custom sorting technique to manage this. Here is a sample that has a SortHelper class that can do most of this work for you. GridDataBoundGridCustomSorting_1520.zip

Loader.
Live Chat Icon For mobile
Up arrow icon