.net - Sort DataTable rows by length in c# -
P> 1.Ooava 2. 2.AOB
3.Oro 4.Uroba
N. LineBox
To sort rows by length, not by name. I want to sort the table based on length of areas.
You can set your datatable
, len ()
Due to the call to the function, a column containing an expression is automatically counted, due to which the values in the column are automatically counted:
add table.Columns ("lengthname", typef (int), "lane (Name)");
Then you can sort your new column to DataTable
before using any type of UI control before binding it in the grid:
table. Default view. Security = "lengthname";
Comments
Post a Comment