Page 1 of 1

Using the GETDATAVALUE in grid

Posted: Tue Jan 12, 2016 7:52 pm
by kjfarison
All,

Can someone show me an example of using the GETDATAVALUE API for a grid?

I can retrieve the value by explicitly providing the row number (row 1) as in the example below...

var customerId = getObj("Grid1").grid.getDataValue(1, "CUSTID");

However, I need to dynamically set the row number when the user mouses over a cell in the grid.

I've found the "onmouseover" event for the grid but how do I retrieve the "rowNumber" value provided by the event?

Thanks.

Kevin

Re: Using the GETDATAVALUE in grid

Posted: Wed Jan 13, 2016 10:11 am
by emhill
I'm going off the top of my head:

1. Add a hidden textbox to the page. Maybe name it "RowNbr".
2. On the grid "onrowmouseover" event use: changeElementValue("RowNbr", row);

Now when you hover over a row the "RowNbr" element will contain the current row number. The changeElement value script above will place the value of "RowNbr" into element row.

Someone correct me if I am off base here....

Re: Using the GETDATAVALUE in grid

Posted: Thu Jan 14, 2016 11:47 am
by kjfarison
Thanks............. Your suggestion helped.