简体   繁体   中英

Need help making my DataGridView sortable

I have a DataGridView that I populate with data that I get from a web service.

AdminTool.adminWS.templateListDTO[] templateList = null;

 AdminTool.adminWS.OwordBeanService owClient = new AdminTool.adminWS.AdminBeanService(); GetAllTemplateList templateListParameter = new GetAllTemplateList(); templateListParameter.UserLanguage = "EN"; templateList = owClient.GetAllTemplateList(templateListParameter); dataGridTemplateList.DataSource = templateList; dataGridTemplateList.Refresh(); 

I've set SortMode to Automatic for all of the columns in my grid, but it won't sort. I have done some research online and from the articles I've read they speak of a sortable BindingList, but I'm not sure how to proceed. Should I be converting what I get from the web service into a sortable BindingList? If so, how can I do that? Is there some other way to make my grid sortable?

Thanks!

This jquery site helped me do the exact same thing in a report. http://www.jeasyui.com/tutorial/datagrid/datagrid8.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM