Dear Abu,
I'm using the following col condition to view image in grid:
$col["condition"] = array('$row["myImage"] == 0', '', "<a class='image-lightbox' href='javascript:;' containertype='image' data-fancybox-type='iframe' data-fancybox-href='../$imagesDir{myImage}'><img height=40 src='../$imagesDir{myImage}'>");
The field name in database is : "myImage" which contain value like "image001.jpg"
When edit the column i got the following value:
<a class="image-lightbox" href="javascript:;" containertype="image" data-fancybox-type="iframe" data-fancybox-href="../imagesDir/image001.jpg" <src="../imagesDir/image001.jpg" height="40"></a>
How Can I retrieve just the value image001.jpg without the format.
Thank you in advance and Best regards.
You can use this unformat code:
$col["unformat"] = "function(cellval,options,cell){ return $('img', cell).attr('src').replace(/^.*[\/]/, ''); }";
It will find img tag, get src, remove path and return file name.
I've not tested it, you can adjust js if required.