hi all,
I need to insert a new column to an existing matrix item in the Stock Posting Form(item No 902)[Stock Management->Stock Transactions->Initial Quantities,Stock Tracking, Stock Posting->Stock Posting]
There exist many rows with data when the form is loaded.So to add a new column, I first cleared the matrix with Clear() method and was able to insert a new column.
The problem is,Clear() method clears all the data from the item matrix.How do i dispaly back all the data in the matrix again????
below is the code snippet...
Set oItm = objForm.Items("3")
Set oSAPMatrix = oItm.Specific
oSAPMatrix.Clear
Set oSAPMatrixCol_Wh = oSAPMatrix.Columns.Add("WH", it_EDIT)
oSAPMatrixCol_Wh.TitleObject.Caption = "WareHouse"
pls help....
On some form containing matrix, it's possible to add column very easily.
For example, on the Sale Order Form (Sales - A/R) :
- Open it, and click on Tools, Form Setting (CtrlShiftS)
-Click on the tab "Table Format", and then you can choose the available column you may add.
On the specific form Stock Posting, you can't add columns in the way I'm describing, but it seems that WareHouse is a parameter from the previous form, and the value is out of the matrix, so you don't need to add it.
Happy new year
Sébastien
This is a good question and unfortunately one that I don't think has an easy answer.
Your best bet is to hide the current matrix, and create a new matrix with your new column and then copy the information in the original matrix into the new matrix.
Hopefully in the future we will be able to
matrix.clear()
and then when we have added our new column
then we can go
dbDataSource.query()
and the system matrix will be refilled from the dbDataSource.
Hope this has helped,
Cormac
Add a comment