1. Robert Sawyer
  2. PowerBuilder
  3. Thursday, 11 July 2024 18:58 PM UTC

I have a list dw. On the retrieveend event or the row focuschanged event, I retrieve a detail dw based on the list values. However, when I sort the list dw, I want to retrieve the detail dw after the sort - because a different list row is highlighted. Can I do this somewhere besides after calling the sort() function? Is there an event on the dw to let me know it was sorted?

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 11 July 2024 19:24 PM UTC
  2. PowerBuilder
  3. # 1

Hi Robert;

  No, there is not special event mapped to the DW Control like "SortEnd".

You have two choices ...

Call the focuschanged event after the sort yourself  // OR

Create an "oe_sort_end" user event on (preferably) a DW Control ancestor. Overload the Sort() command and trigger the "oe_sort_end" user event after the real sort. This approach would now be for all DW Controls from this point on-wards.

Regards .. Chris

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 11 July 2024 19:27 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Robert -

If I understand what you are wanting to do, there are likely several ways to do this. Might I suggest:

1. Add an instance Boolean to the window. Name it something like ib_rowfocuschanged_enabled and give it an initial value of False.

2. In the list DW's RowFocusChanged event, first test the value of this instance Boolean and do nothing unless its value is True.

3. In the list DW's RetrieveStart event, set the instance Boolean to False.

4. In the list DW's RetrieveEnd event, sort the rows, then set the instance Boolean to True, and then manually trigger the list DW's RowFocusChanged event, passing in the argument value 1 for the current row (or whatever value you deem is appropriate).

HTH. Best regards, John

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.