问题
I have a dtdtable in iron python
dttable = handler.GetDataTable();
I tired to create a dataview for the above table by
v=dttable.defaultview
so how do i sort this dttable using iron python ?
回答1:
dv = dttable.DefaultView
dv.Sort="TOP ASC"
dttable = dv.ToTable()
I used the above lines to sort a data table in iron python and It worked fine ."Top" is the column name , and ASC is to sort the table in ascending order
来源:https://stackoverflow.com/questions/12178612/datatable-sorting-in-iron-python