PowerBuilder 双击datawindow列标题排序

在Instance Variable 声明:

string is_sortType = 'D'

在dw_1的doubleclicked()事件:

    string ls_colName  
    ls_colName = string(dwo.name)  
      
    if row=0 and this.describe( ls_colName+'.text')<>'!' and this.describe( ls_colName+'.band')='header' then  
        ls_colName = left(ls_colName,len(ls_colName)-2)  
        if is_sortType = 'D' then  
            is_sortType = 'A'  
        elseif is_sortType = 'A' then  
            is_sortType = 'D'   
        end if  
        dw_1.setsort( ls_colName+' '+is_sortType)  
        dw_1.sort( )  
    end if  


你可能感兴趣的:(PowerBuilder 双击datawindow列标题排序)