rstaib / jquery-bootgrid

Nice, sleek and intuitive. A grid control especially designed for bootstrap.
http://www.jquery-bootgrid.com
MIT License
972 stars 364 forks source link

Data cell formatting #193

Open skiokko opened 9 years ago

skiokko commented 9 years ago

First of all: Great plugin, the best found on all web. Only error is data formatter, is a great way to manipulate cells but if this is only way its a incredibile limitation, i want insert a image, a link, or everything...i must create formatter for everything.

Simple remove formatter and leave HTML into the cell and work is done. Very simple. I tried to get HTML from formatter but get only text. Seem a very stupid problem, but cause many limitations.

Thank you for great work!

SaulBurgos commented 9 years ago

I needed this feature too, I have made a little modification if you want you can use it.

https://gist.github.com/SaulBurgos/1cdb5bc03fd8e7801aee

lines modified are 285 with the comment //modify by saul

you only need specify an attribute in the td that you want see html code like this:

<tr>
    <td>
        <b>556565656</b>
    </td>
    <td>eduardo@pingpong.com</td>
    <td data-html="allow">
        <b>test</b> <i>italic text</i>
    </td>
</tr>
skiokko commented 9 years ago

Hi, Great, thank you very much!

sdezego commented 9 years ago

First, let me express that this plugin is absolutely awesome.

@SaulBurgos thanks for the tweak. This saved me from having to dig into the JS to create this override and it was necessary for my implementation. Would be nice if the API allowed the the data-type to be specified as html in the and it would just passthrough the data cell vs reformatting, but I am by no means complaining.

andremacola commented 8 years ago

Save my day. Formatters is not simple as this solution.

surgiie commented 8 years ago

@SaulBurgos Your tweak should be a feature! Makes more sense to do this then have to do a formatter for each custom cell rendering i need. Thanks for your tweak and saving me a hassle lol!

codeyash commented 7 years ago

Why not to include such a important feature? Please add this to core features.

spellmn commented 5 years ago

Amazing fix, thank you so much for sharing it!