cancel
Showing results for 
Search instead for 
Did you mean: 

Search Cell Values in iGrid and retrieving row values

Former Member
0 Kudos

Hi,

i want to retrieve particular row value in iGrid by making search for particular cell value. for example

name no

==== ==

S1 1

S2 2

i want to retrieve all cell values for S2. but i dont know S2 row number and its also not selected row. without any selection i want pass S2 name into iGrid and want to retrieve no 2. how to do it?

-senthil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

Try following thing

var gObj = document.GridName.getGridObject();
var count = gObj.getRowCount();
var result;
for(i=1; i<=count; i++)
{
	var check = gObj.getCellValue(i,1);
	if (check == "S2")
	{
		result= gOBJ.getCellValue(i,2);
	}
	
}

Here, "result" will store the value 2.

Hope this helps.

Regards,

Musarrat

jcgood25
Active Contributor
0 Kudos

Might also be smart to put a break; after the result assignment inside the IF statement (this will stop if from looping through the entire grid).

Answers (0)