Hi Everybody,
I have a gridView having 5 rows and 5 columns , all are input text components in grid. So i want to get the (2,1) positioning component Id either from the java script or else from Java code in backing bean.
Thanks in Advance,
A.Viswanath Yadav
Hi Vishwanath, Button is placed in order to call this function.
<input type="submit" value="Submit" onclick="getGridNames()"/>
Can you please let us know your requirement?
Thank you!
Swetha
Where should i call this method in my code ?
Hello Viswanath, Please note, input text placed in GridView are dynamically generated and contains only ‘name’attribute. If interested, please click on ‘view source’ and look for particular row value.
In order to get the name/value of first element of the second row, please follow below code snippet. Hope this helps.
function getRowElementName{
var completeRows = ig.grid.instances.myForm_grid.elm.childNodes[0].childNodes[1].rows;
var secondRow = ig.grid.instances.myForm_grid.elm.childNodes[0].childNodes[1].rows[1];
var secondRow_firstElement_name = secondRow.cells[0].childNodes[0].name;
alert(secondRow_firstElement_name);
var secondRow_firstElement_value = secondRow.cells[0].childNodes[0].value;
alert(secondRow_firstElement_value);
}