Schultz’s PowerBuilder Notes

Weird problem with dddw not applying filter when the user clicks on a different updateble column


In my app, if the user clicked on a new row for an updateable column, the dddw filter for pos_cd was not being applied. It would work if the user clicked on row outside any column, or on the pos_cd or rsrc_grp columns. Developed this workaround, added the following to the Clicked Event:

if IsValid(dwo) then
   if lower(dwo.type) <> "datawindow" then
       this.SetColumn('pos_cd' )
       this.SetColumn('dpt_nbr' ) // first column
   end if
   if Lower(dwo.type) = "column" and row > 0 then
      ls_name = dwo.name
      this.SetColumn(ls_name)
   end if
end if

RowFocusChanged

integer li_col
long    ll_row

ll_row = this.GetRow()

if ll_row > 0 and this.RowCount() > 0 then
   wf_populate_resrc_grp_dropdown(ll_row)
   wf_FilterPositions()
   wf_ScrollToRow()
   li_col = this.GetColumn()
   if NOT IsNull(li_col) and li_col > 0 then
      this.SetColumn('pos_cd' )
      this.SetColumn(li_col)
   end if
end if 
Advertisements

May 10, 2008 - Posted by | Drop Down Data Window (DDDW) | , , , , , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: