c# - Sorting on Column of datatable as alphabetically..or filter column -


i want sort data of datatable, want sort on column2 alphabetically.

dataview dv = new dataview(dt); dv.sort = "column2 asc"; dt.defaultview.sort = "column2 asc"; 

dataview dv = yourdatatable.defaultview; dv.sort = "column2";                 yourdatatable = dv.totable(); 

you don't need add asc, it's default, unless want desc :) code worked me :)


Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -