:: Forum >>

confusion about grid post back and getCellText

Hi When I run the following code, I get the request back to my server as expected:

The obj is a grid.

obj.onControlClicked = function(){
var r = new AW.HTTP.Request;
r.setURL("userAccounts.cs1");
r.setRequestMethod("POST");
r.setParameter("col", obj.getCurrentColumn());
r.setParameter("row", obj.getCurrentRow());
//r.setParameter("txt", obj.getCellText(1,1));
if(obj.getCurrentColumn()==6){r.request();}
}

But when I remove the // to run the getCellText function, it will not post the request back to my server. Please please please help me, why is it not posting? I need to get the current column, the current row and the text from one of the cells, specifically, col 1 and row 1 text.

Thanks in advance.
Craig
Craig
Friday, January 30, 2009
Still have the problem, but have one further clue.

I can get the getCellText to work and have the request work as expected, IF I have not performed a
setCellText, or a
setCellValue or a
setCellTemplate
on the cell previous to this call. This is strange. Any help would be greatly appreciated.

Thanks,
Craig.

Craig
Friday, January 30, 2009

Yes, it's strange.

Try this:

r.setParameter("txt", obj.getCellText([obj.getColumnPosition(1)],[obj.getRowPosition(1)]))
D.P
Saturday, January 31, 2009
Check what is actually contained in this cell -

alert(obj.getCellText(1,1));
alert(typeof(obj.getCellText(1,1)));
Alex (ActiveWidgets)
Monday, February 2, 2009

This topic is archived.


Back to support forum

Forum search