cancel
Showing results for 
Search instead for 
Did you mean: 

How to show image in matrix by selecting matrix column type as "it_PICTURE"

former_member209771
Active Participant
0 Kudos

Hi All!

Can i show image in matrix, by selecting matrix column type as "it_PICTURE". If yes please write the steps.

Thanks & Regards

Surojit

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member689126
Active Contributor
0 Kudos

Hi

Try this

First set your column type as picture

sboMatrix.GetLinedata( X ) 'Loads UserDataSources from line X'

sboForm.DataSources.UserDataSources("UDET1").ValueEx = "c:\pic.png"

sboMatrix.SetLinedata (X) 'Sets Matrix line X based on current UserDataSource values'

also create user data source UDET1 as type short text

Regards

Arun

former_member209771
Active Participant
0 Kudos

Dear Arun!

Please tell me the procedure in detail. Like how to link matrix image type column with the path of picture. i have taken mtx_img in which column cl_img is "it_ picture" type and other column cl_path is et_edit type. Please write steps.

Thanking You

surojit

former_member689126
Active Contributor
0 Kudos

Hi

First you have to set the matrix column type as it_PICTURE then bind that column to a userdatasource or dbdatasource. In the following code I am using userdatasource . This code will set the picture to a sepecified columns first row. Please create small image and paste it in your c drive (15X15 size image-- "c:\pic.png")

Dim oColumn As SAPbouiCOM.Column
            Dim mtxDisp As SAPbouiCOM.Matrix = form.Items.Item("mtxDisp").Specific
            form.DataSources.UserDataSources.Add("udsPic", BoDataType.dt_SHORT_TEXT, 254)
            oColumn = mtxDisp.Columns.Item("colPic")
            oColumn.DataBind.SetBound(True, "", "udsPic")
            mtxDisp.AddRow()
            mtxDisp.GetLineData(1) '*Loads UserDataSources from line X*'
            mtxDisp.DataSources.UserDataSources("udsPic").ValueEx = "c:\pic.png"
            mtxDisp.SetLineData(1) '*Sets Matrix line X based on current UserDataSource values*'

Hope this helps

Regards

Arun