Sigma Php Ajax framework, Ajax Components, GUI Builder
May 17, 2012, 01:46:05 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 Grid
>
Sigma Grid - Q&A
(Moderators:
steven
,
gbolanoscruz
) >
List of values
Pages: [
1
]
« previous
next »
Print
Author
Topic: List of values (Read 261 times)
verosb
Newbie
Posts: 1
List of values
«
on:
September 29, 2011, 02:11:03 AM »
How can I implement a list of selection of values taken of a database PHP in my Sigma Grid?
Logged
JLG
Jr. Member
Posts: 6
Re: List of values
«
Reply #1 on:
November 17, 2011, 05:49:11 PM »
Here's a bit of code I've used successfully. It utilized the beforeLoad() function that can be defined in grid options. It does an ajax call to page returning a comma-separated list of values to populate within a drop down column.
beforeLoad : function () { var myConn = new XHConn(); if (! myConn) alert("XMLHTTP not available. The browser you are using will not allow me to refresh the list of team leaders."); var fnWhenDone = function (oXML) { var responseText = oXML.responseText; var reportsToCol = project_team_members_grid.getColumn("reportsTo"); var leaders = responseText.split(","); reportsToCol.editor.valueDom.options.length = leaders.length; for (var i=0; i < leaders.length; i++) { reportsToCol.editor.valueDom.options[i].text = leaders[i]; reportsToCol.editor.valueDom.options[i].value = leaders[i]; } }; myConn.connect("ajax/project_drop_down_list_value_request.php", "POST", "requested_list=current_team_leaders", fnWhenDone); },
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...