cancel
Showing results for 
Search instead for 
Did you mean: 

load Matrix from usertables

Former Member
0 Kudos

hi friend

can any one help me to load matrix from user tables. if any one has its code please reply

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

Hi Billu,

i made a C# sample in past:


oForm = globals.SBO_Application.Forms.Item(FormUID);
 
oForm.DataSources.DataTables.Add("DATA");
oForm.DataSources.DataTables.Item("DATA").ExecuteQuery("SELECT CardCode, CardName FROM OCRD");
               ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxList").Specific)).Columns.Item("ColCC").DataBind.Bind("DATA", "CardCode");                        
 
((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxList").Specific)).Columns.Item("ColCN").DataBind.Bind("DATA", "CardName");
 
 
((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxList").Specific)).Clear();
((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxList").Specific)).LoadFromDataSource();
((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxList").Specific)).AutoResizeColumns();

the trick is that you change the FROM table to your usertable [@USERTABLE] and bind

the columns correctly.

that's it

i hope it helps ...

regards

David

btw. did the column click work from the previous thread ?

Answers (0)