Hi,
Sorry , but after review of forum and doc I can’t understand how to show an image in column cells. I want to do like in this sample : dhtmlx.com/docs/products/dht … extra.html ( “Image” column ) . But also I want to use filter for column ( #connector_select_filter ) . I’m using dinamic grid from database . At this time in php I did showing “Yes/No” - $grid->set_options( “aud_nuras”, array( 0 => “No”, 1 => “Yes” ) );
Hi,
Nobody can help ? Please, let me know how to add images ( like in the sample dhtmlx.com/docs/products/dht … extra.html “Image” column ) with dinamic grid . I wanna to show red/green pictures like in sample for false/true values in grid . How can this be done - from php or javascript source ?
Thanks for direction . From this documentation I did for mine column type “eXcell_roImg” . Then did that :
function eXcell_roImg( cell )
{
if ( cell )
{
this.cell = cell;
this.grid = this.cell.parentNode.grid;
}
this.edit = function(){}
this.isDisabled = function(){ return true; } this.setValue=function( val )
{
this.setCValue( "<input type='image' src='codebase/imgs/" + ( val == 1 ? "green" : "red" ) + ".gif' WIDTH='10' HEIGHT='10'>", val );
}
}
eXcell_roImg.prototype = new eXcell;
But entering into page it return : Error type: Configuration Description: Incorrect cell type: eXcell_roImg . And image in grid , of course, didn’t appears … What that is wrong ?
Sorry for posting in wrong . Exastly this lines are in two lines . Simply pasted and removed “// coment” and didn’t noticed , that they stands in one line here . So what can be wrong with that new excelll type ? Maybe it’s informatant place where to describe ? I tried that before grid and after grid .
It leaves only one question . In previuos with that “roImg” type I was using “coro” and in php used $grid->set_options( “aud_nuras”, array( 0 => “No”, 1 => “Yes” ) ); How to do that this column header filter get combobox with “Yes/No” ? Now I’m seeing “1/0” … Return value “Yes/No” ?
Unfortunately the default filters work with cell’s value only.
You will have to create your custom filter or redefine the logic of the default one.
Here is the tutorial: docs.dhtmlx.com/doku.php?id=dhtm … of_filters
Not sure that we are talking about the sames thing … I want to do , that in column header will appears filter values “Yes/No” instead “1/0” . Now the documentation is talking about custom logic for filtering . Something can’t understand ? I’m seeing that the second step for that will be very valuable - convert “Yes/No” value to “1/0” and then to use custom logic . But how to show “Yes/No” in filter combobox ? Please help …