Issue regarding the new PeopleSoft Grid class function - ShowColumns
Hi
I had a requirement to hide 2 columns (CNTRCT_ID, CNTRCT_LINE_NBR) on a grid when a Page is displayed, and only show them if the Transaction code is "PO".
I found this new peoplecode function ShowColumns. So, I went through the documentation and here's the code:
PageActivate:
Component Grid &grdBLKCF;
&grdBLKCF = GetGrid(Page.NY_RC_BLKFILE_GEN, "NY_BLKFILE_CF");
&showCOL = CreateArrayRept(CreateArrayRept("", 2), 0);
&showCOL.Push(CreateArray("CNTRCT_ID", "N"));
&showCOL.Push(CreateArray("CNTRCT_LINE_NBR", "N"));
&grdBLKCF.ShowColumns(&showCOL);
Comments: The above code worked perfectly fine. The 2 columns were invisible on Page display.
FieldChange:
Component Grid &grdBLKCF;
Local array of array of string &showCOL;