Table Field Ellipse

Table Field Ellipse

aluitinkaluitink Posts: 4Questions: 0Answers: 0
edited October 2010 in General
I've searched around the forum a bit and couldn't find anything on this but I was wondering if there was any built in auto ellipse for field data longer than the field. I'd like to maintain row hight but currently if field data is longer than the field it is put onto another line, this makes the table bumble-y looking when flipping pages, table size adjusts and bounces around.

Is there a way to say if the text in the field is longer than the field, truncate the text and add ... in its spot?

Thanks,

Replies

  • lleveringllevering Posts: 12Questions: 0Answers: 0
    For IE you can use the CSS 'text-overflow: ellipsis;', for other browser that isn't going to work. You can use 'overflow: hidden;' and 'white-space: nowrap;' however then you will not see the ellipsis. You could implement an fnRender function: http://datatables.net/examples/advanced_init/column_render.html like in this example to custom build into your table.
This discussion has been closed.