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     [CLOSED] JS Grid set focus to specific cell?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] JS Grid set focus to specific cell?
 Login/Join
 
Gold member
posted
I have a JS Grid on my Maintain form.
It uses a javascript on the Onload function.
In addition, it has events that show separate forms.

When one of those events is triggered that shows a separate form and then I close that separate form,
can I set the focus back to the specific cell that I clicked - recognizing javascript is being run on the Onload function.

Example:
Stack on JS Grid is 40 columns wide by 50 rows.

I click on cell from Row 40 Column 38 which triggers and event shows a separate form.

When I close that separate form - after the Onload function runs, can i set the focus to
Row 40 Column 38?

This message has been edited. Last edited by: Kerry,


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve
 
Posts: 61 | Location: St Louis | Registered: May 15, 2003Report This Post
Master
posted Hide Post
Brad
What you will need to do is store the coordinates of the cell that you wish to return to in a variable on the form. Then use your JsGridOnload to read those coordinates and set the cursor to the cell.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
So how do I set the cursor to that specific cell?


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve
 
Posts: 61 | Location: St Louis | Registered: May 15, 2003Report This Post
Master
posted Hide Post
You will use JavaScript to retrieve the values from those cells and then use:

Form.Grid.SetCellFocus(col, row) ;

to move the cursor to the cell.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
I added this setcellfocus to the end of my javascript. I set a specific row and column.
(Row 4 column 6)
The javascript is executed on the OnLoad event.

I even set the focus onthe grid object.

But the cursor does not seem to be on my specified row/colunm( Row 4 Column 6).

What am I doing wrong?


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve
 
Posts: 61 | Location: St Louis | Registered: May 15, 2003Report This Post
Master
posted Hide Post
Brad
First off, please try the code behind a button as a test to make sure the code is correct. Once it is working you have to put it with the JSGridOnload function, not the form onload function.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
--When I add the setFocusCell to a button, it does indeed work properly.

--I have the same setcellfocus in the javascript file as part of the JSGridOnload function and an alert right after that.
Each time the form loads/refreshed, I do see my alert message but the focus is not on the specified cell.

--On the javascript file, I have added the setcellfocus to the beginning and/or to the end of the javascript file. Again, I do see the alert message each time but focus is not on specified cell.


Brad S.
WF 8.05 / Win7 /Tomcat Self Serve
 
Posts: 61 | Location: St Louis | Registered: May 15, 2003Report This Post
Master
posted Hide Post
Brad
You can try adding the code to the FOCUS event for the grid. However, I'm not sure if that will be respected when you tab on or click into the grid. If you can get me a small repro I will be happy to give it a try.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report 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     [CLOSED] JS Grid set focus to specific cell?

Copyright © 1996-2020 Information Builders