PDA

View Full Version : GridPanel cellclick event with image problem



yonishec
30 Oct 2007, 5:12 AM
Hello,

I'm using GridPanel 2.0.
In my grid some of my columns have text and some have images.
All the values in the grid are sent to the same renderer function that all it does is to add another CSS class.
I put the value in a span and return it as you do in your examples:


function setRowStyle(value, domObj, dm, rowIndex, colIndex)
var className = dm.data[" + (m_CAColumns.Count - 1) + "];
var retValue;
if (className != ""){
retValue = '<span class=' + className + '>' + value + '</span>';\n");
}
else{
retValue = '<span style=\"FONT-SIZE:11px;FONT-FAMILY:tahoma;COLOR:#173452\">' + value + '</span>';
}
return retValue;
}

I use the CellSelection Model and defined the cellclick event.
The event is fired when ever i select a column but not when i select a column that has an image in int.
If i don't use the render function and put the value (text or image) as is then even clicking on an image will fire the event.

Why is that????

Joni

mike1993
18 Feb 2008, 8:42 AM
I second the question...