javascript for OnGrid1_OnRowChange: var DynamList=document.frmDetail.EditBox1.value; // Replace the "," with "\n" var myRegExp = /,/gi; DynamList=DynamList.replace(myRegExp,"\n"); document.frmDetail.Grid1.GetCell(2,newRow); document.frmDetail.Grid1.QuickSetCellType(2, newRow, 1); document.frmDetail.Grid1.QuickSetLabel (2, newRow, DynamList);
List1 is correctly bound to an editbox on my form. To debug the javascript, I placed alerts after each line. The javascript appears to work until it reaches document.frmDetail.Grid1.GetCell(2,newRow); when it stops returning the alert statements.
Any clues on how to get the drop-down list to overlay the grid?
Thank you, DeanaThis message has been edited. Last edited by: Deana,
WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively; excel, html, pdf
May 15, 2019, 09:46 AM
Maintain Wizard
Deana This technique uses HTML to create the drop down list in the JS Grid. This is a static list but we could create a dynamic list as well.
Notice that when a selection is made, we perform a JS function called getval. I have included that function at the end of the code. It copies the selection into the answer field.
Your JS Grid should have a column called app that is Content Type HTML and another column, Answer, for the selection to reside.
My example has App in column 2 and Answer in column 3. If you move the columns you will have to adjust saver / getval. If you would like this example please send me your email and I will send it to you.
Mark
MAINTAIN FILE empdata
$$Declarations
Case Top for 10 next pin into stk compute i/i2=1; repeat stk.foccount
The code samples you sent worked great. I am looking forward to using this functionality as I move forward with my project.
Thank you, Deana
WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively; excel, html, pdf