Skip to Content
avatar image
Former Member

UI - Trap a Deleted row in matrix

Hello,

is there a way to know if a matrix row is been deleted ?

In a user form i have a matrix, I fill 3 rows, then I delete the second row. So Matrix RowCount remain 3, how can i intercept the deleted row ?

Best regards

Andrea

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Apr 23, 2004 at 10:00 AM

    Hi Andrea,

    >is there a way to know if a matrix row is been deleted ?

    >In a user form i have a matrix, I fill 3 rows, then I

    >delete the second row.

    Do you mean the deleted by user interaction (<Ctrl>-<K>)or

    do you use "DeleteRow" for that?

    Regards,

    Frank

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 23, 2004 at 10:05 AM

    Hi Frank,

    I use CTRL-K (even if i think that the delete method may have the same behaviour)

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Andrea,

      in the meantime I checked it:

      Please note that the "RowCount" of the matrix object always returns "no. of filled rows + 1" just as it is indicated in the "#" column!

      Regards,

      Frank

  • avatar image
    Former Member
    Apr 23, 2004 at 01:04 PM

    Ok i have checked it ! The RowCount is 3 but the i have only two lines filled ! But the problem remain. I manage a user table in this matrix, how can i sign the deleted line so when i push the update button i can delete it from the db table?

    Add comment
    10|10000 characters needed characters exceeded

    • Andrea,

      regrettably there is no direct support in the SDK for what you want to do, at least not yet:

      In 6.7 there will be support by the new feature of user-defined objects (UDO) which might provide you with the functionality you need. But this will only be available for C++!

      In the meantime you have to use workarounds:

      See which events come (LOST_FOCUS - as the deleted row of course cannot have the "focus", GOT_FOCUS..) in connection with the number of rows in the matrix.

      Then you have to store the keys for the later following update and remove the data through "GetByKey" + "Remove" of the UserTable object.

      If you use DBDataSources, you could compare what's in your DBDataSource with what's in your matrix and perform the necessary actions.

      Regards,

      Frank

  • avatar image
    Former Member
    Apr 23, 2004 at 02:16 PM

    ok thanks Frank !

    Add comment
    10|10000 characters needed characters exceeded