cancel
Showing results for 
Search instead for 
Did you mean: 

iGrid - Double Click Event --> Result = blank

Former Member
0 Kudos

Hello folks!

I created an iGrid. The iGrid shows around 40 columns all filled with the right value from SAP.

With a double-click I call a function to get the value from a cell.

This is working for columns 1 to 8 in the iGrid. As soon as I double-click on column no. 9 the value which is given back by the iGrid is "blank".

Cell selection is allowed in the iGrid (everything is working for column 1 to 😎

Coding:

function Get_Selected_PLOS(){
var col = document.Grid_QM.getGridObject().getSelectedColumn();
var value = document.Grid_QM.getGridObject().getSelectedCellValue(col);
aert(col + " - " + value);
}

The alert shows the right thing (column + value)...but only from column 1 to 8.

From column 9 it shows the column-no. and "blank" (e.g. "11 - ").

The alert shows the right thing (column + value)...but only from column 1 to 8.

From column 9 it shows the column-no. and "blank" (e.g. "11 - ").

The alert shows the right thing (column + value)...but only from column 1 to 8.

From column 9 it shows the column-no. and "blank" (e.g. "11 - ").

In another iGrid I got a similar problem. I create an array and when I show the array iin the alert I see that also only column 1 to 9 are filled. The alert looks like this:

,value1,value2,value3,value4,value5,value6,value7,value8,value9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

I think I have some mistake in the iGrids but I can not figure out what it is??!!

Thanks for your help...Martin

Edited by: Martin Zipp on Jul 13, 2010 5:29 PM

Sorry...I had to change the "alert" to "aert" otherwise it didn´t allow me to post it?!?!?!?!?!

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Kudos

Martin,

Can you display the Applet on your webpage for us to see? Also is the problem with the specific field in column 9 (can you change the order around and still only get 8 columns behaving correctly?)?

It sounds like the iGrid may only be defined for 8 columns and the rest are being extended without a defined display template structure. I would still think the columns/cells should be referenced correctly within the grid object, but perhaps not.

Thanks,

Mike

Answers (2)

Answers (2)

Former Member
0 Kudos

Message with SAP Support created.

sidnooradarsh
Contributor
0 Kudos

Which version/release of MII are you using?

Former Member
0 Kudos

Hi,

Have you added any columns in iGrid layout? Please check in iGrid properties.

One more point is how many columns are getting displayed when iGrid is loaded on the page?

What is the version?

There is a problem in selected row number count in MII 12.0.6.

Best Regards,

Kedar

Former Member
0 Kudos

Hello!

Thanks for the fast replies!

I just did a test with changing the iGrid-Layout.

As soon as I do NOT choose any vertical grid, it is working.

I figured out that the cell-value-capture is only working for the amount of data-rows in my iGrid.

This is working:

Header1 Header2 Header3

Data1

Data2

Data3

Data4

Data5

This is only working for the amount of headers I have --> so the Data4+ is not shown anymore:

Data1 Data2 Data3 Data4 Data5

Header1

Header2

Header3

So when choosing VerticalGrid the rows and columns change but I can only select data of columns up to the maximum of the amount of my rows.

Any suggestions?

Regards, Martin

Former Member
0 Kudos

Martin,

does a combination of the following work?

- row = getSelectedRow()

- col = getSelectedColumn()

- value = getCellValue( row, col)

Michael

Former Member
0 Kudos

Unfortunately not:

var col = document.myTest.getGridObject().getSelectedColumn();

var row = document.myTest.getGridObject().getSelectedRow();

var value= document.myTest.getGridObject().getSelectedCellValue(row,col);

As soon as I add the "row" I get an error:

I somehow have to tell him that on screen the column is actually the row of the applet.

Understand what I mean?

Former Member
0 Kudos

Martin,

in your snippet you wrote "getSelectedCellValue". Have you tried "getCellValue( row, col )?

Michael

Former Member
0 Kudos

Hi Michael,

I tried this too:

var col = document.myTest.getGridObject().getSelectedCellColumn();

var row = document.myTest.getGridObject().getSelectedCellRow();

var value= document.myTest.getGridObject().getCellValue(row,col);

Working in the same way then the other coding. Up to column 16 and after that return is "blank".

Edited by: Martin Zipp on Jul 14, 2010 2:00 PM

Former Member
0 Kudos

Tricky, this one...

Does it help to swap the row / col values? getCellValue( col, row )?

Edited by: Michael Otto on Jul 14, 2010 2:02 PM

agentry_src
Active Contributor
0 Kudos

Can you show the actual grid data for each presentation scenario?

Former Member
0 Kudos

Hello,

a friend and I think that it is a bug.

Please find a short document with my screenshots.

If you want to re-build the scenario you have to take care that when creating the iGrid you need to have more data than columns and then choose vertical grid.

Hope you can access the link:

Link: [PDF with Screenshots|http://home.arcor.de/marzi7/screens.pdf]

http://home.arcor.de/marzi7/screens.pdf

Thanks and regards,

Martin

PS: Sorry that the screens are in German but I forgot to change language

Edited by: Martin Zipp on Jul 15, 2010 9:32 AM

Former Member
0 Kudos

Martin,

I set up an example, though in MII 12.0.2. It is working with code like this:


var col = document.getElementById("Grid").getGridObject().getSelectedCellColumn();
var row = document.getElementById("Grid").getGridObject().getSelectedCellRow();
var value= document.getElementById("Grid").getGridObject().getCellValue(row,col-1);

Interestingly the SelectedCellColumn value is 1 column too high. I have also used getSelectedCellValue, which also worked after decreasing col.

I have tested with 6 columns and 9 / 10 rows, and all went well in the VerticalGrid. Maybe this is really an error which you should sent to SAP as a ticket.

Michael

Former Member
0 Kudos

Hi All,

It appears to be a bug that was fixed. I tested this in 12.0.10, and this code works as expected:

var gridObj = document.MyGrid.getGridObject();

var col = gridObj.getSelectedCellColumn();

var row = gridObj.getSelectedCellRow();

var value = gridObj.getCellValue(row, col);

Please note that column numbering starts at an index of 1. I recommend upgrading to the latest service pack and patch level of 12.0.10, available on the Service Marketplace.

Kind Regards,

Diana Hoppe

Former Member
0 Kudos

Hi thanks.

But we are using 12.1.5.95

Regards, Martin

Former Member
0 Kudos

Hi Martin,

Sorry, I saw references to 12.0, I did not realize you were using version 12.1. I am able to reproduce your issue, and it does look as though the problem occurs in the VerticalGrid and VerticalScoreboard when the number of columns exceeds the number of rows. Please enter a message with regard to this issue into the SAP Support system.

Kind Regards,

Diana Hoppe

Former Member
0 Kudos

Thanks to all.

I created a message for SAP.

I´ll mark the question as answered.

Regards,

Martin