Subfile Row

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
nascar88
Profound User
Posts: 42
Joined: Wed Aug 04, 2010 5:12 pm
First Name: Bob
Last Name: Steach
Company Name: APHA
Contact:

Subfile Row

Post by nascar88 »

What is the javascript property name for the subfile row.

I have tried the following:( var Row = getObj("GridClas").row; ) and the variable Row contains 'undefined'. ??

I am trying to get the current row of the subfile.
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: Subfile Row

Post by Alex »

Can you explain what you mean by current row and how you are trying to use it?

If your JavaScript is within the onrowclick, onrowdblclick, onrowmouseover, or onrowmouseout event, a variable named row is already created for you, and it contains the current row.
nascar88
Profound User
Posts: 42
Joined: Wed Aug 04, 2010 5:12 pm
First Name: Bob
Last Name: Steach
Company Name: APHA
Contact:

Re: Subfile Row

Post by nascar88 »

I have a subfile with multiple check boxes and not all of the check boxes can be checked. When the user checks a particular one I am unchecking others.

From your response I have figured out how to do this with the following code.

onrowmouseover ( changeElementValue('N', row); ) N is a textbox.

On the check boxes onchange event I have this code.....

var rn = getObj("N").value;
var CkBox1 = getObj("SBAG1." + rn).checked;

if ( CkBox1 == true )
{ getObj("SBAG2." + rn).checked = false;
getObj("SBAG3." + rn).checked = false; }

I am not a java programmer so all of this is new to me.

But I do have a question. Where do you find what var properties and the name of them, that are available to me for each of the control widgets. ( ie subfiles, check boxes, buttons etc)

I did not know that "row" was a var property name.
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: Subfile Row

Post by Alex »

The property help text for onrowclick, etc. describes the special row variable that is provided. In addition, there are several API that we provide, like pui.click() or getObj(). It seems you have already found them. They are described in the Client-side Scripting API Reference in the White Papers/Guides section of ProfounhdUI.com.

getObj() gets a reference to a widget element. You can then use standard JavaScript / DOM (Document Object Model) coding to access and modify properties. One of the most commonly used web sites to provide a tutorial and a reference for JavaScript and DOM is http://www.w3schools.com/js/default.asp.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests