Sigma Php Ajax framework, Ajax Components, GUI Builder
February 11, 2012, 08:06:10 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
Sigma Php Ajax framework, Ajax Components, GUI Builder
>
Sigma Visual GUI Builder & Library
>
Sigma Visual - Q&A
(Moderators:
steven
,
linb
) >
How to wrap lines in treeGrid?
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to wrap lines in treeGrid? (Read 634 times)
gikotim
Sr. Member
Posts: 49
How to wrap lines in treeGrid?
«
on:
March 11, 2010, 02:47:33 AM »
Hi!
I try do display a text .eg. 100 char in a treegrid. Even though I make the cell higher, the text gets not wraped.
How can I display larger text in a treegrid?
Thank your for your help!
Logged
linb
Administrator
Hero Member
Posts: 433
Re: How to wrap lines in treeGrid?
«
Reply #1 on:
March 11, 2010, 04:46:59 PM »
1.No 'space' in your 100 chars?
2. In firefox?
Any way, you need give a special css class, or css style, or a wrap to your text.
you can use the following setting in header/row/cell data object:
cellRenderer
// cellRenderer:function(o){return "<div>"+o.value+"</div>"}
cellStyle
// cellStyle:'word-break:break-all;'
cellClass
Logged
gikotim
Sr. Member
Posts: 49
Re: How to wrap lines in treeGrid?
«
Reply #2 on:
March 12, 2010, 08:41:00 AM »
yes I have many spaces in the text, and yes I use Firefox, but it doesn't break the lines in IE8 either.
I've put in your code:
host.pXXX.append((new linb.UI.TreeGrid) .host(host,"tg_xxx") .setDock("none") .setRowNumbered(false) .setRenderer(function(o){return "<div>"+o.value+"</div>"}) .setHeader([{"id":"ID", "width":80, "type":"label", "caption":"Nr.","cellStyle":"padding-left:10px"}, {"id":"solved", "width":80, "type":"checkbox", "caption":"One"}, {"id":"question", "width":250, "type":"textarea", "caption":"Two","cellStyle":"word-break:break-all;"}])
Can you give me a hint what I'm doing wrong?
Thanks
Logged
linb
Administrator
Hero Member
Posts: 433
Re: How to wrap lines in treeGrid?
«
Reply #3 on:
March 13, 2010, 05:28:46 PM »
Don't use setRenderer, setRenderer is for the grid itself.
.setHeader([ {"id":"ID", "width":80, "type":"label", "caption":"Nr.", "cellStyle":"padding-left:10px"}, {"id":"solved", "width":80, "type":"checkbox", "caption":"One"}, {"id":"question", "width":145, "type":"textarea", "caption":"Two", cellRenderer : function(o){ return "<div style='white-space:normal;word-break:break-all;'>"+o.value+"</div>" } } ])
Logged
gikotim
Sr. Member
Posts: 49
Re: How to wrap lines in treeGrid?
«
Reply #4 on:
March 13, 2010, 11:08:55 PM »
Hi linb!
thank you so much, this does the trick!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News & Announcements
-----------------------------
Sigma Visual GUI Builder & Library
-----------------------------
=> Sigma Visual - Knowledge Share
=> Sigma Visual - Q&A
=> Bug Report & Wishlist
-----------------------------
Sigma Grid
-----------------------------
=> Sigma Grid - Q&A
=> Show Case
=> Bug Report & Wishlist
-----------------------------
Other
-----------------------------
=> AJAX & JavaScript
Loading...