cancel
Showing results for 
Search instead for 
Did you mean: 

how to open a second grid, by clicking on first grid

Former Member
0 Kudos

Hi

On my htm page, i have a grid, by clicking on any of row of the first grid, i want to open a second grid, below the first gird, which will contain only the values of that row.

For the first gird, I am using the code <PARAM NAME="DoubleClickEvent" VALUE="Doubleclick">

and i have written a function as Doubleclick in the java script.

Now want code i should write under the function (Doubleclick) in the java script.

Can you help me out with the code for the same.

thanks,

Ashish

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ashish,

-Create Transaction with Document with required columns and assignment block ,Assign document output to some output variable.

-create an Xacute Query for the above transaction.

-Map this xacute query to your second grid query template.

-Initially make second grid hidden.

-On double click of row from first grid, write following code in that doubleclick function,

get all cell value of all columns passing each column number,

document.GridApp1.getGridObject().getSelectedCellValue(COLNUMBER);

Pass it to second grid using

document.GridApp2.getGridObject().setCellValue(ROWNUMBER,COLNUMBER,VALUE)

Then make second grid visible.

Try this , Hope this helps you.

Regards

Padma

Former Member
0 Kudos

Hi

Padma,

I am new to this technology, can u tell me how to hide the second grid, what code i should add in the applet.

And my grid is containting the following data:

Airline AirportTo AirportFrom Price

Jet BOM DEL 4500

Kingfisher PUN IND 4000

Say, now when i will select 2nd row, my second grid should get following data

Airline AirportTo AirportFrom Price

Kingfisher PUN IND 4000

Can you explain the code more in detail.

thanks,

Former Member
0 Kudos

Hi

Padma,

I am new to this technology, can u tell me how to hide the second grid, what code i should add in the applet.

And my grid is containting the following data:

Airline AirportTo AirportFrom Price

Jet BOM DEL 4500

Kingfisher PUN IND 4000

Say, now when i will select 2nd row, my second grid should get following data

Airline AirportTo AirportFrom Price

Kingfisher PUN IND 4000

Can you explain the code more in detail.

thanks,

Former Member
0 Kudos

Ok, which MII version are you using?

Former Member
0 Kudos

12.0

Former Member
0 Kudos

ok,

Now create one transaction with 2 action blocks,

1-Document-This you can find in SAP xMII XML Output Folder under Actions tab.

2-Assignment-This you can find in Logic Folder under Actions tab.

configure Document and add column name.

Right click on assignment block and give links, Document output to output variable(XML).

If you are using table to place grids use Span Id to <td> or <tr> whichever u need to hide, This u can search by googling.

Then use document.getElementById('Span ID').style.display="None" to hide.

To make grid visible use document.getElementById('Span ID').style.display="inline"