Skip to Content
author's profile photo
Former Member

Programmatically changing the value of cell in a matrix

I have a matrix where all the columns are connected to user data sources. The user can enter/edit data. When the user tabs off one particular column, I bring up a search screen where the user can select a value/item, but how do you set the matrix cell value to the value/item selected by the user?

I have tried:

SAPbouiCOM.EditText edText = (EditText)Grid.Columns.Item("Col3").Cells.Item(SomeRowNumber).Specific;

edText.Value = SomeNewValue;

But this does not work. I have also tried setting the value of the user data source bound to the column but that also does not work. Any help would be greatly appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Jun 15, 2004 at 03:36 AM

    I've found the solution to my problem by using the SetLineData method of the Matrix.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jun 15, 2004 at 03:59 PM

    This code surely works :

    oMatrix.Columns("yourcolumn").Cell(yourRow).Specific.String = "something"

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      You can also set the value using the userdatasource

      This is supposedly a better (and faster?) way to set a value.

      uds.value="YourValue"

      HTH Lutz Morrien