on 01-24-2007 11:40 AM
Hi everyone, I am trying to retrieve the value of a cell from the first column of a matrix depending on which row the user has highlighted. I can access the value from specifying which row to retrieve the value from but not from the user selecting which row. Im attempting do do this from the open items list system form which is accessed from the reports menu.
To retrieve the value from the first row my code is as follows:
oMatrix = oForm.Items.Item("5").Specific
DocNo = oMatrix.Columns.Item("1").Cells.Item(1).Specific.Value
SBO_Application.MessageBox(DocNo)
How do I change this code to access the value of the cell depending on which row is highlighted?
Any help would be appreciated
Hi Sally,
you will get the selected row number on any event through "pVal.Row", you can get this value in a integer variable like:
int i = pVal.Row
and pass it in your code;
DocNo = oMatrix.Columns.Item("1").Cells.item(i)
or you can do same in this way also:
you have to specify your particular cell as a edit text and get the value of that:
oEditText=(SAPbouiCOM.EditText)oMatrix.Columns.Item("1").Cells.Item(i).Specific;
string1 = oEditText.String;
Hope it will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks everyone, I have solved the problem....I was attempting to make the click event on the matrix work when the user presses a button which was causing problems...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Matrix object has 2 methods to get the selected row
GetNextSelectedRow
IsRowSelected
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.