on 05-28-2008 11:10 AM
hi friend
can any one help me to load matrix from user tables. if any one has its code please reply
thanks
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
6 | |
5 | |
5 | |
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.