cancel
Showing results for 
Search instead for 
Did you mean: 

Sample code on how to implement similar matrix used in Item Groups Setup

0 Kudos

Dear friends,

Please can someone help me with the logic or similar codes on how to implement the matrix used to display the G/L accounts in the Item Group.

Item Groups is found under Administration/Setup/Stock Management.

I want to know how they implemented the accounts section that they are displayed that way. It appears that the fields are columns in table OITB and they are showing as rows.

I want to implement a similar scenario in a project.

Please I will be waiting for your immediate answer.  Thanks.

The screen shot is attached.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi All,

Please someone should help me with this issue.

Thanks

Former Member
0 Kudos

Hi Olumide,

I was finally able to work a bit on your question and the result is here:

http://scn.sap.com/community/business-one-sdk/blog/2015/06/11/matrix-revisited

Regards,

Eric

0 Kudos

Hi Eric,

Thanks for your reply.

I have implemented it. See the version I have. But it still does not look as expected:

I used the formats you asked me to use. What I still don't have here is that the matrix's height does not extend further that this even when I increased the height. I want to hide the scroll bars

Also I want to be able to display header title for the yes/no column just as the first image i attached at the beginning looks like.

Is this also possible?

Thanks for your help so far.

Regards

Former Member
0 Kudos

Hi Olumide,

You have not made the first column as invisible, which will remove the vertical scroll bar.

The horizontal one is due to the fact that you have more than one record to display.

First image, like I wrote in my second answer, is of Layout = 0 with titles filled Inside the first column and not numbers like in the list of items in any of the documents.

Regards,

Eric

0 Kudos

Hi Eric,

Now I have done that.

The horizontal scroll bar is blocking the edit area of the last information. I need to remove it. I cannot even use the combo box to pick information in there.

Let me insert the sample guide again. I seriously want it to look like this below:

Again, I want to display account determination in my second tab in my 1st image like this one above.

I want to be able to use choosefromlist and linkbutton in there, and show the description of the account picked. This is the reason I want my columns to display the header caption/title as above.

See that this image does not display horizontal scroll bar. What did they do?


Thanks. Hope to hear from you. Regards

Former Member
0 Kudos

Hi Olumide,

Layout is still 2 while it should be 0...

Besides this, CFL and LinkButton don't depend on the layout.

Regards,

Eric

0 Kudos

The above is layout=0 but this is not the shape I want. I don't know if there is something else I am missing.

In your earlier messages, you said that to make the matrix vertical I should use layout 1 or 2.

But I want to make it vertical, that is the reason i used layout=2.

Former Member
0 Kudos

Hi Olumide,

Layout = 0 with some "magic"

0 Kudos

Hi Eric,

Please show me the magic with the layout=0 to achieve the above.

Thanks

Former Member
0 Kudos

Hi Olumide,

I provided as links, the srf (xml) and source code for you to see

I'm glad B1's projects exist in Nigeria, but sad nobody asked me to participate

Regards,

Eric

0 Kudos

Hi Eric,

Yes, there are B1 projects in Nigeria. It is relatively small market at the moment. With time, it hopes to grow. If I may ask, what level of participation do you need?

Still back to the links of the srf(xml), where did you host it so I can check.

Hope to hear from you,

Regards

Former Member
0 Kudos

Hi Olumide,

From my SCN display, the files are links at the bottom of my previous-previous answer.

Answer to other question is private, so we catch us on LinkedIn

Regards,

Eric

0 Kudos

Hi Eric,

Yes I did see the xml but no source code in vb.net/c#.net attached.

I think the srf only won't help me

Thanks

Former Member
0 Kudos

Hi Olumide,

Strange... I clearly have a code.txt.zip file with the source code. Anyway, provided again.

Regards,

Eric

0 Kudos

Hi Eric,

Where can I find it? It is not attached here, and I have also checked your previous mail also/

Thanks

0 Kudos

Eric,

Thanks. I have seen it now. I will check and get back to you

Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Olumide,

This specific setup of a matrix is used in several places (addresses and contacts pour BP, and so on).

It is "easy" to implement: matrix.Layout = mlt_Vertical;

Regards,

Eric

0 Kudos

Hi Eric,

Thanks for your quick answer.

Could you please check the image i attached again?

There you will find out that it has both rows and columns with caption, and a cell to insert values.

I have just implemented your answer, the column does not have caption.

I also want the row that is displayed vertically to be unenabled i.e look like a label, and the columns same. I also want it to allow me to insert the respective values.

Hope you can help with this also?

Regards

Former Member
0 Kudos

Hi Olumide,

Checking the bitmap and your explanation, my first answer was wrong.

So don't change the layout, but disable the column: matrix.Columns.Item(colId).Editable = false

Regards,

Eric

0 Kudos

Hi Eric,

I think your explanation about layout is correct. What I need now is how to make sure I have title displayed for the column also. Also to format it to look like a matrix with row and column with cell interception just as it is displayed there.

Thanks

0 Kudos

Let me show you what I have. My screen shot is attached

See the matrix under the highlighted tab. I have made the matrix vertical which is ok for me. I want to achieve these additional values:

1. I want it to display header with title e.g "Yes/No"

2. I only want 1 column to display. I dont need the other columns on the right.

3. I want the width to be smaller and tight as it is with the previous screen shot I added at first.

Thanks