Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
535
Data sorted, but grid view is not
posted

I'm getting data from my sql server in a sorted order, but the display of the grid is not showing the rows sorted.

var fieldlist = db.spFieldList(Util.GetSID());
gridFieldList.DataSource = fieldlist.ToList();
gridFieldList.DataBind();

I've checked that the data in DataSource is sorted. The first column in the grid is a GroupByColumn and it is sorted properly, but the rows under each group are NOT sorted.

Any idea why the sort is not "sticking"? And if no, can someone provide some code to have the grid sort itself? I don't want the end-user to be able to click on headers to change the sort.

Thanks!