datatable sorting in iron python?

做~自己de王妃 提交于 2019-12-13 03:57:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!