row number

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

row number

Post by ppbedz »

Hello,

I coded logic to retrieve the row number of the grid row modified on the onselect, but I keep getting a "row undefined" error. Can someone please assist? Thank you, Patti

This is the code on the OnSelect property (I get the alert so I know I am in the right spot):

alert("code is running");
var rrn = getObj("grid1").grid.getRRN(row);
alert(rrn);
pui.set("T_VendChgRow",rrn);
pui.click()
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: row number

Post by mwalter »

at first look, the default ID for a grid would be Grid1 with a capital "G". Are you sure that your grid is named properly in your code?
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Re: row number

Post by ppbedz »

Hi Mark,

Yes. I ended up sending my issue to support and they assisted. Part of my problem was I was running an older version of my javascript that had been cached. Thank you for your response.
pjshuey
Experienced User
Posts: 119
Joined: Wed May 25, 2016 11:58 am
First Name: Patti
Last Name: Shuey
Company Name: Conestoga Wood Specialties
Phone: 7174452886
Address 1: 645 Reading Road
City: East Earl
State / Province: Pennsylvania
Zip / Postal Code: 17519
Country: United States
Contact:

Re: row number

Post by pjshuey »

What was the solution to this? I am having the same issue.
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Re: row number

Post by ppbedz »

Hello,

It was a combination of things. I needed to clear my cache and close any open threads related to old jobs on our Iseries. The other mistake I was making was executing the pui.click outside of my function. Support provided the code sample below. Hope this helps...

function myFunc(selection,textBox) { //passes the textBox parameter used to reference the textbox widget
var boxID = textBox.id; //get the ID of the textbox widget
var rowNum = boxID.split('.').pop(); //get the portion of the ID that contains the row number
alert(rowNum); //shows a browser alert of the row number for testing
pui.click();
}

myFunc; //calls the function
pjshuey
Experienced User
Posts: 119
Joined: Wed May 25, 2016 11:58 am
First Name: Patti
Last Name: Shuey
Company Name: Conestoga Wood Specialties
Phone: 7174452886
Address 1: 645 Reading Road
City: East Earl
State / Province: Pennsylvania
Zip / Postal Code: 17519
Country: United States
Contact:

Re: row number

Post by pjshuey »

Thanks so much! I will give this a shot!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest