Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-06-2006, 01:24 PM   #1
himik
Registered User
 
Join Date: Sep 2006
Posts: 1
Default combobox datagrid lose selected item

Hi i have the following setup:

datagrid populated from xml source(asp returns xml recordset) and few comboboxes are populated from the same datasource.
When user selects an item from the datagrid the selected corresponded value appears in the combobox. However when the user changes to other application such as excel and goes back to the flex2 application,clicks on any portion of it, the selectedItem values resets to the first item in combobox (even tho it is still correctly selected in the datagrid). out of the 6 comboboxes 3 lose value and 3 retains; they use the same data source

Code:
 <mx:DataGrid x="10" y="196" width="667" height="200" id="dgOrder" dataProvider="{OrderRequest.lastResult.college.record}">
            <mx:columns>
              <mx:DataGridColumn headerText="Campus" dataField="campus" width="52"/>
              <mx:DataGridColumn headerText="Category" dataField="category" width="56"/>
              <mx:DataGridColumn headerText="Area" dataField="area" width="45"/>
              <mx:DataGridColumn headerText="Dept" dataField="department" width="45"/>
              <mx:DataGridColumn headerText="Type" dataField="type" width="50"/>
              <mx:DataGridColumn headerText="Status" dataField="status" width="50"/>
              <mx:DataGridColumn headerText="Ord.Year" dataField="orderedyear" width="65"/>
              <mx:DataGridColumn headerText="Ord.Date" dataField="OrderedDate" width="65"/>
              <mx:DataGridColumn headerText="DCBN" dataField="DCBN" width="60"/>
              <mx:DataGridColumn headerText="Title" dataField="TITLE" width="100"/>
              <mx:DataGridColumn headerText="Copies" dataField="Copies" width="45"/>
            </mx:columns>
            
          </mx:DataGrid>
          <mx:Text x="6" y="401" text="{dgOrder.selectedItem.grantorderid}" id="orderId"  height="20"/>
    	  <mx:ComboBox x="176" y="414" id="idCampusEdit"   selectedIndex="{getIndex(dgOrder.selectedItem.campusNo,ComboRequest.lastResult.college.record.campus.combo)}"  dataProvider="{ComboRequest.lastResult.college.record.campus.combo}"></mx:ComboBox>
          <mx:ComboBox x="176" y="444" id="idCategoryEdit"  selectedIndex="{getIndex(dgOrder.selectedItem.categoryNo,ComboRequest.lastResult.college.record.category.combo)}"  dataProvider="{ComboRequest.lastResult.college.record.category.combo}"></mx:ComboBox>
          <mx:ComboBox x="176" y="474" id="idAreaEdit"   selectedIndex="{getIndex(dgOrder.selectedItem.areaNo,ComboRequest.lastResult.college.record.area.combo)}" dataProvider="{ComboRequest.lastResult.college.record.area.combo}"></mx:ComboBox>
		  <mx:ComboBox x="176" y="504" id="idDepartmentEdit" selectedIndex="{getIndex(dgOrder.selectedItem.departmentNo,ComboRequest.lastResult.college.record.department.combo)}"  dataProvider="{ComboRequest.lastResult.college.record.department.combo}"></mx:ComboBox>
          <mx:ComboBox x="515" y="414" id="idTypeEdit"   selectedIndex="{getIndex(dgOrder.selectedItem.typeNo,ComboRequest.lastResult.college.record.type.combo)}" dataProvider="{ComboRequest.lastResult.college.record.type.combo}"></mx:ComboBox>
          <mx:ComboBox x="515" y="444" id="idStatusEdit"   selectedIndex="{getIndex(dgOrder.selectedItem.statusNo,ComboRequest.lastResult.college.record.status.combo)}" dataProvider="{ComboRequest.lastResult.college.record.status.combo}"></mx:ComboBox>
          <mx:ComboBox x="515" y="474" id="idOrderedYearEdit"   selectedIndex="{getIndex(dgOrder.selectedItem.orderedyearNo,ComboRequest.lastResult.college.record.orderedyear.combo)}"  dataProvider="{ComboRequest.lastResult.college.record.orderedyear.combo}"></mx:ComboBox>
himik is offline   Reply With Quote
Old 09-19-2006, 09:22 PM   #2
flexy
Everything about me's...
 
Join Date: Aug 2006
Location: UK
Posts: 198
Default

Looks like quite a crazy app.
flexy is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting selected item from combobox? gazzer82 Components 18 10-23-2006 02:52 AM
Changing the selected item in a combobox mcmcom Components 3 07-28-2006 11:42 AM
ComboBox setting the first item selected problem Ihou Components 1 01-21-2006 07:17 AM
Setting selected item for combobox AS1 Paul Ferrie Components 2 05-15-2005 05:44 PM
comboBox SELECTED ITEM font oaker Components 3 02-27-2005 01:26 AM


All times are GMT. The time now is 06:48 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.