Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 10:27:29 PM *
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: How to set ListItems in TreeGrid  (Read 652 times)
gikotim
Sr. Member
****
Posts: 49


View Profile
« on: February 02, 2010, 02:26:28 PM »

Hi I try to set the listItems in a treeGrid header with data out of a database.
It works - almost. Here my code:

1. Attempt to set it directly with the rsp.data failed badly.

2. Attempt is to convert the data into a sting. But I then get a listitem with all items in one line.



Can you point me in the right direction?

Thank you very much
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: February 02, 2010, 04:50:50 PM »

What's your rsp.data's construct ? It's a hashmap?

Logged
gikotim
Sr. Member
****
Posts: 49


View Profile
« Reply #2 on: February 02, 2010, 10:53:05 PM »

The structure of rsp.data and items is exactly the same.
items = [["Active"], ["Locked"], ["Deleted"]]

after inserting them the dropdown shows three lines with single characters starting with 'a'/'b'/'c' and each time you open it again it increments to 'd'/'e'/'f' and so on
How come?


« Last Edit: February 02, 2010, 10:55:18 PM by gikotim » Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #3 on: February 02, 2010, 11:32:53 PM »

Then,


listItems' acceptable formats:
1: ['a','b','c']
2:[{id:'a',...},{id:'b',...},{id:'c',...}]
« Last Edit: February 02, 2010, 11:36:54 PM by linb » Logged
gikotim
Sr. Member
****
Posts: 49


View Profile
« Reply #4 on: February 02, 2010, 11:44:37 PM »

works perfect!
many thanks  Grin
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!