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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


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