:: Forum >> Version 2 >>

Mysql, modifying cells problem

Ok, I'm being dumb. I know. But for some reason, I'm having a problem.

I use PHP to read from a MySQL database and build an array for AW. I grabbed this code from a forum response Alex gave.

So, I successfully populate an AW grid. Not a problem.

But, I can't seem to modify those contents via code. For instance, I have a Title and a URL in the array elements. What I want to do is combine them so the Title becomes a link based on the URL value.

Title is col 3
URL is col 4

I've even tried this for testing:

obj.setCellValue(function(col,row) {
return obj.getCellValue(4,row) + " <br>" + obj.getCellValue(3,row);
},3);

and

obj.setCellText(function(col,row) {
return obj.getCellText(4,row) + "<br> " + obj.getCellText(3,row);
},3);

Just to see if I could combine the cells at all. But all I get is the Title in the cell. Not the URL

Just for clarification ... I forced the row height to 50px and set the row to wrap (and set it's width to 600px). Just to make sure I was seeing it and it wasn't scrolled off some place.

Guys ... what stupid thing am I doing wrong?
Thanks ... Carl
Saturday, February 3, 2007
Carl, this is possibly due to a bug in AW 2.0.1 where using setCellText() with 2d array argument prevents the further calls with a function and a column number, i.e.

var myData = [[...]];
obj.setCellText(myData);
obj.setCellText(func, col); // does not work

but it will work if you use the function in both places -

var myData = [[...]];
obj.setCellText(function(c,r){return myData[r][c]});
obj.setCellText(func, col); // works

This is a bug and it will be fixed in 2.0.2.
Alex (ActiveWidgets)
Tuesday, February 6, 2007



This topic is archived.

Back to support forum

Forum search