Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Flash Integration / December 2005



Tip: Looking for answers? Try searching our database.

Binding from grid to cfselect

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dpinder123 - 11 Oct 2005 18:26 GMT
This is what I can do:

Select a row from the Grid and bind to to several input boxes. I have select
boxes that change the data in the grid (it binds this way), but, when selecting
one of the gridrows, the select box does not display the data (state and loan
status).

Any suggestions?

!---/// this binds to the grid fine ///--->

<cfselect id="loanStatus" label="Loan Status:" name="loanStatus" width="200"
bind="{orderGrid.dataProvider[orderGrid.selectedIndex]['loanStatus']}"
        onchange="orderGrid.dataProvider.editField(orderGrid.selectedIndex,
'loanStatus', loanStatus.text);">
        <cfoutput query="getOrderStatus">
  <option
value="#getOrderStatus.loanStatus#">#getOrderStatus.loanStatus#</option>
</cfoutput> </cfselect>
aparsons - 14 Oct 2005 03:19 GMT
Do something like this in your grid statement:  Also,  i think you'll have to
add an <option value=""> so that you have a null value in there.

<cfgrid name="studentList" query="studentQuery" height="440" rowheaders="false"
            onchange="for (var i:Number = 0; i<grade.length; i++) {if
(grade.getItemAt([i]).data == studentList.selectedItem.grade)
grade.selectedIndex = i}
                     for (var i:Number = 0; i<school.length; i++) {if
(school.getItemAt([i]).data == studentList.selectedItem.school_id)
school.selectedIndex = i}
                     for (var i:Number = 0; i<state.length; i++) {if
(state.getItemAt([i]).data == studentList.selectedItem.state)
state.selectedIndex = i}
                     for (var i:Number = 0; i<researchcat.length; i++) {if
(researchcat.getItemAt([i]).data == studentList.selectedItem.cat_abb)
researchcat.selectedIndex = i}
                     for (var i:Number = 0; i<sex.length; i++) {if (sex.getItemAt([i]).data
== studentList.selectedItem.sex) sex.selectedIndex = i}">
finger5844 - 28 Nov 2005 05:03 GMT
> aparsonswrote:
Do something like this in your grid statement:  Also,  i think you'll
have to

:(! You should definatly be given smoething for that.   :X
rebster - 08 Dec 2005 18:48 GMT
Is there a way to do else = 0  Like

<cfgrid name="studentList" query="studentQuery" height="440"
rowheaders="false"  onchange="
for (var i:Number = 0; i<cfselectname.length; i++) {if
(cfselectname.getItemAt().data == studentList.selectedItem.columnname)
cfselectname.selectedIndex = i} else {cfselectname.selectedIndex = 0}
for (var i:Number = 0; i<cfselectname.length; i++) {if
(cfselectname.getItemAt().data == studentList.selectedItem.columnname)
cfselectname.selectedIndex = i} else {cfselectname.selectedIndex = 0}">

My page won't load with the "else".  Please help with actionscript.  
rebster - 08 Dec 2005 19:30 GMT
The original database did not require an entry in the field.  
So, the grid has some records with data and other records are null.  

When I pick an item from the grid with data - the bind works.  
If the next selection does not have data - the cfselect does not clear, it
holds the last records data unitl another record with data is selected from the
grid.  

Any help with Actionscript here would be greatly appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.