Skip to Content

Getting data from LinkedButton matrix cell



I'm having trouble finding a proper way to extract my text data from a Matrix Cell that holds a LinkedButton.

<b>Current condition:</b>

I have a Matrix that is bound to some data via. a user defined object.

<b>Temporary solution:</b>

I have found a way by going through the form's DataSource and getting the value by defining the DB-table, DB-field and what row i'm interested in. My current C# code for this looks like this:

<i>Column col = matrix.Columns.Item(colUID);


String MyValue = Form.DataSources.DBDataSources.Item(DBtabel).GetValue(DBfield, RowNr);</i>

<b>Secondary problem:</b>

A DataSource is not always "up to date" with the data that is shown in the matrix. Matrix.LoadFromDataSource(); and Matrix.FlushToDataSource(); have to used frequently.

Are there really no other method for this ?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2004 at 02:54 PM

    Here is the way I did it, it's in VB, it may help you

    Public Function GetDataFromMatrix(ByVal oForm As SAPbouiCOM.Form, ByVal MatrixName As String, ByVal ColName As String, ByVal RowNumberStart1 As Int16) As String

    Dim oMatrix As SAPbouiCOM.Matrix

    Dim oEditText As SAPbouiCOM.EditText

    oMatrix = oForm.Items.Item(MatrixName).Specific

    oEditText = oMatrix.Columns.Item(ColName).Cells.Item(RowNumberStart1).Specific

    Return oEditText.Value

    End Function

    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.