Skip to Content
author's profile photo Former Member
Former Member

Selecting rows in a matrix

Hi

I am trying to select certain rows in a matrix, not a user defined one but an actual sbo one. I have tried using the omatrix.select method but vb gives me an error about the item is not a user defined item and cannot be manipulated in such a manner.

Anyone got any ideas please ?

Regards Andy

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2004 at 08:13 PM

    This code contains your solution.

    It iterates over each line in a SYSTEM matrix, and tests for a value in a column. If the value in the column is in a list, it will select that row by executing a 'Click' on the first column in the list.

    It has multiple selection logic in it as well, as more than one row in the list may be valid.

    NumberOfReceiptsFoundInMatrix = 0

    For RowIndex = 1 To ReceiptMatrix.RowCount

    Debug.Print ReceiptMatrix.Columns("DocNum").Cells(RowIndex).Specific.Value

    If ExistsInCollection(CLng(ReceiptMatrix.Columns("DocNum").Cells(RowIndex).Specific.Value), ReceiptNumbers) = True Then

    If NumberOfReceiptsFoundInMatrix = 0 Then

    '

    ' Single select

    '

    Call ReceiptMatrix.Columns(1).Cells(RowIndex).Click(ct_Regular)

    Else

    '

    ' Multiple select for all further Receipts

    '

    Call ReceiptMatrix.Columns(1).Cells(RowIndex).Click(ct_Regular, mt_CTRL)

    End If

    '

    ' Track the number of Receipts that have been found, so the searching can stop once all

    ' the Receipts have been selected.

    '

    NumberOfReceiptsFoundInMatrix = NumberOfReceiptsFoundInMatrix + 1

    End If

    If NumberOfReceiptsFoundInMatrix = ReceiptNumbers.Count Then

    '

    ' Break out of for loop early if all of the Receipts have been found.

    '

    Exit For

    End If

    Next RowIndex

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2004 at 09:00 AM

    Most system form have restrictions to what the SDK can do with them... But try clicking the grayed-out column in the system matrix... Most system matrices selcet rows that way....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.