linq - DataGridView not sortable when AutoGenerateColumns = true + Anonymous Types? -


can datagridview sortable when bound anonymous type? if yes, how?

you can on sort event or wherever else want sorting happen - thing you'd have reload data:

   var query = c in linq         select new         {             id = c.id,             data= c.data,         }          anonymous         order anonymous.id ascending          select anonymous;       this.yourdatagrid.datasource = query.asenumerable(); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -