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.
Unfortunately, activation email could not send to your email. Please try again.

Sorting a datagrid fed from an arraylist of structs

Thread ID:





206 Apr 30,2002 01:06 PM May 1,2002 04:03 PM Windows Forms 1
Tags: FAQ
Asked On April 30, 2002 01:06 PM

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.

Clay Burch [Syncfusion]
Replied On May 1, 2002 04:03 PM

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.