Jump to content


is posible to display an image in the datatables or flexigrid ?

image datatables flexigrid

  • Please log in to reply
4 replies to this topic

#1 wenkhairu

wenkhairu

    Member

  • Members
  • PipPip
  • 13 posts

Posted 10 January 2012 - 07:14 AM

hi,
is posible to display an image in the datatables or flexigrid ?
i have some extracode to combine some jquery plugin for displaying an image from database to datatables or flexigrid, but no luck for me, it doesn't work, may be you gusy have tried before and work,

#2 web-johnny

web-johnny

    grocery CRUD Author

  • Administrators
  • 1,150 posts
  • LocationLondon

Posted 12 January 2012 - 09:51 PM

hi,
is posible to display an image in the datatables or flexigrid ?
i have some extracode to combine some jquery plugin for displaying an image from database to datatables or flexigrid, but no luck for me, it doesn't work, may be you gusy have tried before and work,


Did you try it to do with callback_column ( http://www.grocerycr...callback_column ) ?
Posted Image

#3 wenkhairu

wenkhairu

    Member

  • Members
  • PipPip
  • 13 posts

Posted 13 January 2012 - 04:09 AM

yeah, it works great, now it work for me, but there is another problem, the style have a little problem, the button and the text inside datatables, but that not the big promblem as long as the image still appear, but i though may be there is a way to change the css in other the style look like nice even there is an image inside it,

thanks for the quick replay :)

#4 hunterbit

hunterbit

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts
  • LocationLe Castella

Posted 04 February 2012 - 01:28 AM

Hello,
how you solved the problem?
you may send an example?

thanks


Now its ok.

Thanks all

#5 neocastelli

neocastelli

    Member

  • Members
  • PipPip
  • 13 posts

Posted 25 December 2012 - 03:23 PM

Hello,
how you solved the problem?
you may send an example?
thanks
Now its ok.
Thanks all

Hello hunterbit,

This is the simple solution, if you know how to add the ajax class on this you are the boss :D.

$crud->callback_column('image',array($this,'Image'));

function Image($value, $row)
    {
        return '<a class="ajax" href="uploads/' . $value .'"><img src="uploads/' . $value . '" alt="' . $value . '" width="24" height="24" /></a>';
        
    }






Also tagged with one or more of these keywords: image, datatables, flexigrid

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users