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

Sorting a datagrid fed from an arraylist of structs

I have an arraylist of structs. They use a custom table style to be displayed on my DataGrid. I cannot figure out how to get the little triangles to appear to allow for custom sorting.

1 Reply

CB Clay Burch Syncfusion Team May 1, 2002 08:03 PM UTC

The default sorting is done through a DataView which requires a DataTable. If you have just set your grid's DataSource to ArrayList, then there is no DataTable and hence no DataTable. One solution would be to move your ArrayList into a DataTable, and bind that or a DataView based on it to your grid. Then the AllowSorting property of teh TableStyle would probably get you going on sorting. Clay Burch

Live Chat Icon For mobile
Up arrow icon