Sigma Php Ajax framework, Ajax Components, GUI Builder
May 24, 2012, 11:38:54 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Treegrid questions  (Read 729 times)
gikotim
Sr. Member
****
Posts: 49


View Profile
« on: January 15, 2010, 04:34:04 AM »

Hi!
I have a treegrid with different columns: col1 = checkbox, col2= text, col3 = number, col4 = currency

Now my questions:

1. what column-types exist? (label and number I found in the examples). How to specify currency (e.g. $35.00). Can I do my own formating?

2. How can I only make one column editable (in my example the checkbox)?

3. If I specify label as column-type it is not editable, but it's alway left aligned which is bad for numbers. How to change?

Thank your very much for your support!
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: January 15, 2010, 08:50:24 PM »

>>1. what column-types exist? (label and number I found in the examples). How to specify currency (e.g. $35.00). Can I do my own formating?

column-types:

  • label
  • input
  • number
  • datepicker
  • colorpicker
  • textarea
  • button
  • checkbox
  • progress

to get $35.00:

header: [{...}, {id:'number',  cellRenderer:function(cell){return '$'+cell.value;}}, {...}]


>>2. How can I only make one column editable (in my example the checkbox)?

set TreeGrid editable: false

and,

header: [{...}, {id:'checkbox',  editable:true}, {...}]


>>3. If I specify label as column-type it is not editable, but it's alway left aligned which is bad for numbers. How to change?

header: [{...}, {id:'number',  cellStyle:"text-align:right;"}, {...}]
Logged
gikotim
Sr. Member
****
Posts: 49


View Profile
« Reply #2 on: January 15, 2010, 11:48:46 PM »

Thank you so much for the explanation!
It helped very much.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!