image/icon in a table cell

image/icon in a table cell

jesse32jesse32 Posts: 9Questions: 0Answers: 0
edited February 2012 in General
Can i put an image into a table cell?
the scenario is that i have to put several images based on a field value in the table(red icon,if stock =0,orange icon if stock<10;green icon =if stock>10)

Replies

  • damon83damon83 Posts: 3Questions: 0Answers: 0
    edited February 2012
    Yes is quite simple you must only put the html code into the appropiate column with some php code, something like that:



    <?php
    if ($stock > 10)
    {
    echo "";
    }
    elseif ($stock < 10 & $stock > 0)
    {
    echo "";
    }
    elseif ($stock <= 0)
    {
    echo "";
    }

    ?>
  • damon83damon83 Posts: 3Questions: 0Answers: 0
    I need something related with this, but in my case I need to permit user upload images in the "formAddNewRow", with the tipical , and then show them in the new created row without refreshing the table. I suppose I need some javascript code to achieve that, but Im missing something when passing the data from the form to the table. I haven't found any useful example for this either. HELP!!!
  • jesse32jesse32 Posts: 9Questions: 0Answers: 0
    i am using this datatable with mvc3(razor engine) the datable is loaded via juery
This discussion has been closed.