Page 1 of 1
Subfile Row
Posted: Wed Sep 15, 2010 6:51 pm
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.
Re: Subfile Row
Posted: Thu Sep 16, 2010 10:38 am
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.
Re: Subfile Row
Posted: Fri Sep 17, 2010 8:11 am
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.
Re: Subfile Row
Posted: Mon Sep 20, 2010 2:57 pm
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.