[flexcoders] Importing CSV file to a data grid

2006-09-28 Thread sahay17
Hi all,
I want to import data from a csv file to a datagrid.For that i need
1) to open a browse dialog box.
2) Select the file and import to the data grid.
Is it possible and if yes can you guide me with it.

Thanks in advance.






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Datagrid with a dropdown column!

2006-09-13 Thread sahay17
Hi,
Thanks for the prompt solution.

Thanks,
Anurag.

--- In flexcoders@yahoogroups.com, Joan Lafferty [EMAIL PROTECTED] wrote:

 Since your dataProvider has values of 'b', i and 'e, then, your
 ComboBox dataProvider should also have these values:
 
 mx:ComboBox labelFunction='outerDocument.myLabelFunction
  mx:dataProvider
  mx:String b/mx:String
  mx:String i/mx:String
  mx:String e/mx:String
  /mx:dataProvider
  /mx:ComboBox
 
  
 
 Then, you can set a labelFunction on the ComboBox itemRenderer like
 this:
 
 private function myLabelFunction(item:Object):String
 
 {
 
 switch(item)
 
 {
 
case b: return beginner;
 
case i: return intermediate;
 
default: return expert;
 
 }
 
 }
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of sahay17
 Sent: Monday, September 11, 2006 10:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Datagrid with a dropdown column!
 
  
 
 Hi Joan,
 Thanks for the reply. It was really helpful.But the problem now is 
 that the datagridcolumn rating is picking 'b' or 'i' or 'e' from 
the 
 array collection and now I have to map 'b' to 'beginner' in the 
 combobox. Similary I have to map 'i' to 'intermediate' in combobox 
 and similary I have to map 'e' to 'expert' in combobox. How to get 
on 
 with it? 
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Joan Lafferty tan@ wrote:
 
  Anurag,
  
  
  
  Yes, as someone pointed out before, you can use a custom 
 itemRenderer.
  Yours would look something like the code provided below. Notice 
 that if
  you want the ComboBox to be editable, you should specify that
  renderIsEditor=true and specify the editorDataField.
  
  
  
  mx:DataGrid id=skillDG width=100% height=100% 
  sortableColumns=true dataProvider={_model} editable=true
  mx:columns
  mx:Array
  mx:DataGridColumn headerText=Skill Name 
  dataField=skillName editable=false/ 
  
  mx:DataGridColumn headerText=Rating 
  dataField=ratingId rendererIsEditor
  
 
http://flashteam.macromedia.com/flashplatform/imd/zaphod/deliverables
 
http://flashteam.macromedia.com/flashplatform/imd/zaphod/deliverables
 
 /Z
  
 
orn/LangRef/mx/controls/dataGridClasses/DataGridColumn.html#rendererIs
 Ed
  itor =true editorDataField=selectedItem 
  
  mx:itemRenderer
  
  mx:Component
  
  mx:ComboBox
  
  mx:dataProvider
  
  mx:String beginner/mx:String
  
  mx:String intermediate/mx:String
  
  mx:String expert/mx:String
  
  /mx:dataProvider
  
  /mx:ComboBox
  
  /mx:Component
  
  /mx:itemRenderer
  
  /mx:DataGridColumn 
  
  /mx:Array
  /mx:columns
  /mx:DataGrid
  
  
  
  Joan
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of sahay17
  Sent: Monday, September 11, 2006 2:38 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Datagrid with a dropdown column!
  
  
  
  Hi all,
  I am having a datagrid skillDG with 2 datagridcolumn 
 as skillName 
  and ratingId which is picking data from arraycollection.
  
  mx:DataGrid id=skillDG width=100% height=100% 
  sortableColumns=true dataProvider={_model} editable=true
  mx:columns
  mx:Array
  mx:DataGridColumn headerText=Skill Name 
  dataField=skillName editable=false/ 
  
  mx:DataGridColumn headerText=Rating 
  dataField=ratingId / 
  
  /mx:Array
  /mx:columns
  /mx:DataGrid
  
  But now i want that my datafieldcolumn ratingId to be a 
dropdown 
  with skills namely beginner,intermediate and expert. Is it 
possible?
  
  Thanks and Regards,
  Anurag.
 








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Datagrid with a dropdown column!

2006-09-12 Thread sahay17
Hi Joan,
Thanks for the reply. It was really helpful.But the problem now is 
that the datagridcolumn rating is picking 'b' or 'i' or 'e' from the 
array collection and now I have to map 'b' to 'beginner' in the 
combobox. Similary I have to map 'i' to 'intermediate' in combobox 
and similary I have to map 'e' to 'expert' in combobox. How to get on 
with it? 


--- In flexcoders@yahoogroups.com, Joan Lafferty [EMAIL PROTECTED] wrote:

 Anurag,
 
  
 
 Yes, as someone pointed out before, you can use a custom 
itemRenderer.
 Yours would look something like the code provided below. Notice 
that if
 you want the ComboBox to be editable, you should specify that
 renderIsEditor=true and specify the editorDataField.
 
  
 
 mx:DataGrid id=skillDG width=100% height=100% 
 sortableColumns=true dataProvider={_model} editable=true
 mx:columns
 mx:Array
 mx:DataGridColumn headerText=Skill Name 
 dataField=skillName editable=false/ 
 
 mx:DataGridColumn headerText=Rating 
 dataField=ratingId rendererIsEditor
 
http://flashteam.macromedia.com/flashplatform/imd/zaphod/deliverables
/Z
 
orn/LangRef/mx/controls/dataGridClasses/DataGridColumn.html#rendererIs
Ed
 itor =true editorDataField=selectedItem 
 
 mx:itemRenderer
 
 mx:Component
 
  mx:ComboBox
 
   mx:dataProvider
 
mx:String beginner/mx:String
 
mx:String intermediate/mx:String
 
mx:String expert/mx:String
 
   /mx:dataProvider
 
 /mx:ComboBox
 
  /mx:Component
 
   /mx:itemRenderer
 
 /mx:DataGridColumn 
 
 /mx:Array
 /mx:columns
 /mx:DataGrid
 
  
 
 Joan
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of sahay17
 Sent: Monday, September 11, 2006 2:38 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Datagrid with a dropdown column!
 
  
 
 Hi all,
 I am having a datagrid skillDG with 2 datagridcolumn 
as skillName 
 and ratingId which is picking data from arraycollection.
 
 mx:DataGrid id=skillDG width=100% height=100% 
 sortableColumns=true dataProvider={_model} editable=true
 mx:columns
 mx:Array
 mx:DataGridColumn headerText=Skill Name 
 dataField=skillName editable=false/ 
 
 mx:DataGridColumn headerText=Rating 
 dataField=ratingId / 
 
 /mx:Array
 /mx:columns
 /mx:DataGrid
 
 But now i want that my datafieldcolumn ratingId to be a dropdown 
 with skills namely beginner,intermediate and expert. Is it possible?
 
 Thanks and Regards,
 Anurag.







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Binding drop down according to value of a data field!

2006-09-11 Thread sahay17
Hi all,
I m having a datagrid which has a column Rating as a drop down.The 
dataprovider _model is an arraycollection. Now what I want is that if 
the datafield ratingId is 'B' I should populate Beginner in the 
drop down. Similarly if I ve ratingId as 'I', I should 
populate Intermediate in the drop down.Similarly if I 
ve  ratingId as 'E', I should populate Expert in the drop 
down.How to bind the drop down as such? Or is there a better way of 
doing this?

-
DROP DOWN:-
mx:Component id=skillLevel
mx:ComboBox
mx:StringBeginner/mx:String
mx:StringIntermediate/mx:String
mx:StringExpert/mx:String
 /mx:dataProvider
/mx:ComboBox
/mx:Component
-
DATA GRID


mx:DataGrid id=skillDG width=100% height=100% 
sortableColumns=true dataProvider={_model} editable=true
mx:columns
mx:Array
mx:DataGridColumn headerText=Skill Name 
dataField=skillName editable=false/

mx:DataGridColumn headerText=Rating 
dataField=ratingId editorDataField=selectedItem 
itemEditor={skillLevel}/ 

/mx:Array
/mx:columns
/mx:DataGrid  

Thanks,
Anurag.






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Datagrid with a dropdown column!

2006-09-11 Thread sahay17
Hi all,
I am having a datagrid skillDG with 2 datagridcolumn as skillName 
and ratingId which is picking data from arraycollection.

mx:DataGrid id=skillDG width=100% height=100% 
sortableColumns=true dataProvider={_model} editable=true
mx:columns
mx:Array
mx:DataGridColumn headerText=Skill Name 
dataField=skillName editable=false/

mx:DataGridColumn headerText=Rating 
dataField=ratingId / 

/mx:Array
/mx:columns
/mx:DataGrid

But now i want that my datafieldcolumn ratingId to be a dropdown 
with skills namely beginner,intermediate and expert. Is it possible?

Thanks and Regards,
Anurag.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] getting 1119: Access of possibly undefined property reference through a referenc

2006-07-27 Thread sahay17
Hi,
I am new to Flex environment.Please can you help me with a 
problem.When I am trying to run the following code, I am getting 
error 1119: Access of possibly undefined property result through a 
reference with  static type mx.rpc.http.mxml:HTTPService

Code:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute creationComplete=feedRequest.send()
mx:HTTPService id=feedRequest 
url=http://weblogs.macromedia.com/mchotin/index.xml; 
useProxy=false/
mx:Label x=20 y=50 
text={feedRequest.result.rss.channel.title}/ 
mx:DataGrid x=20 y=80 id=dgPosts width=400
mx:columns
mx:DataGridColumn headerText=Column 1 
dataField=col1/
mx:DataGridColumn headerText=Column 2 
dataField=col2/
/mx:columns
/mx:DataGrid
mx:TextArea x=20 y=245 width=400/
mx:LinkButton x=20 y=300 label=ReadFullPost/
/mx:Application
Please help me out.






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] How to export data in datagrid to a csv file?

2006-07-07 Thread sahay17
Hi All.
I am very new to FLEX environment. Can you all help me with exporting  
my data from a datagrid to a csv file?

Thanks and Regards,
Anurag.






 Yahoo! Groups Sponsor ~-- 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/