增加二个按钮一个:升序 函数为:AddCol(GridName,"排序",0, True ) AndSetColFormula(GridName,"排序","Selcase([编号] = """",""x"", True ,[编号])") And RecalcCol(GridName,"排序") And SortCol(GridName,"排序",1) And DeleteCol(GridName,"排序")
另一个为降序 :AddCol(GridName,"排序",0, True ) AndSetColFormula(GridName,"排序","Selcase([编号] = """",""0"", True ,[编号])") And RecalcCol(GridName,"排序") And SortCol(GridName,"排序",1) And DeleteCol(GridName,"排序")
比较笨的的方式