Rawu G's thinking

此刻 只有点燃

博客园 首页 新随笔 联系 订阅 管理

iit's simple .

here is my code in event 'pbm_dwndropdown'
        datawindowchilde dw_child
        This.GetChild("colname",dw_child)
        dw_child.SetDetailHeight(1,dw_child.RowCount(),80)
        dw_child.SetFilter(" condition <>  i_need")
        dw_child.Filter()
        dw_child.SetDetailHeight(1,dw_child.RowCount(),0)
        dw_child.SetFilter("")
        dw_child.Filter()
        
Then OK..   Tag :  PowerBuilder 下拉数据窗口 过滤 displayname 

all above refer to http://pbdj.sys-con.com/read/42519.htm
summary:
The trick here is not to filter. You need to have the description or display value in the primary buffer. One method is to use SetDetailHeight to mimic "filtering."

  • Unfilter all rows and set detail height to "standard height".
  • Filter out rows you want to display (yes, the good ones).
  • SetDetailHeight to 0 for the rows in the primary buffer (this will make them invisible).
  • Unfilter the DDDW.

    You'll be left with all the rows so the display value can be found but the rows you don't want to see have a height of 0

  • posted on 2005-12-24 14:25  Rawu  阅读(511)  评论(0编辑  收藏  举报