Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved] Maintain js Grid CellSetText error

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Maintain js Grid CellSetText error
 Login/Join
 
Gold member
posted
Hello,

I am trying to set the value of 2 columns of the current row in a js grid using CellSetText (col, row, value). Below is my js code.

var objDg = document.getElementById('Grid1');//returns null
var objDg2 = document.Form1.Grid1;//returns a dg obj
objDg2.CellSetText (0, 1, 'Y'); //sets the value of the 1st cell in 2nd row correctly
Code Breaks here
objDg2.CellSetText (2, 1, "test");// only gets to this point if the value of col 0 is already "Y"

I have tried:
1) replacing double quotes with single quotes
2) using document.Form1.Grid1 instead of objDg2
3) switching the lines so column 2 is set before column 0
4) using GetCurrentRow and SetCurrentRow

I use this code on other .mnt files and forms without error, I do no understand why this will not work in the .mnt/form.
I am using Maintain version 7.7.03.

Any suggestions will be appreciated.

Thank you,
Deana

This 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
 
Posts: 89 | Registered: March 19, 2011Report This Post
Master
posted Hide Post
Deana
This code works for me:

Form1.Grid1.CellSetText(0,1,'Y');
Form1.Grid1.CellSetText(2,1,'test');

If this code doesn't work for you, please open a case and we can go from there.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
This issue is user error. I had 2 .js files, 1 for common code used for multiple forms and one for form specific code. A function got deleted from the common code. I don't remember editing the shared .js file, but must have at some point.

Thank you Mark for your assistance.


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
 
Posts: 89 | Registered: March 19, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved] Maintain js Grid CellSetText error

Copyright © 1996-2020 Information Builders