[flexcoders] Re: How to render HTML text in data grid column?
Hi David, I am glad that flexcoders is starting to work for you. I've been helped for other people in the list, and now that I know more about Flex, I am happy to help. See the example below, I think it does what you need. Note that I change the Label for a Text tag. I noticed that the Text tags displays BR and Label does not. Again, do not forget that you can only display basic HTML. I have seen the list of supported HTML tags someplace in the help. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ [Bindable] public var myArray:Array = [{colA:'A',colB:'B'},{colA:'A1',colB:'This is font color=#FF' + 'HTML text/font in a bText' + 'component/b. BR'+ 'Using the uhtmlText attribute/u of the '+ 'font color=#008800 Text component/font you can use basic HTML markup'}]; ]] /mx:Script mx:DataGrid id=myGrid dataProvider={myArray} width=100% height=50% variableRowHeight=true mx:columns mx:Array mx:DataGridColumn dataField=colA headerText=Column A width=70/ mx:DataGridColumn dataField=colB headerText=Column B width=50 wordWrap=true mx:itemRenderer mx:Component mx:Text height=100 htmlText={data.colB} / /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:Array /mx:columns /mx:DataGrid /mx:Application --- In flexcoders@yahoogroups.com, envidobi [EMAIL PROTECTED] wrote: Hi Oscar, Thanks a bunch for replying. I've had about 10 posts now and i've not gotten a single reply. Thanks for your time! :) I get what you're doing but if i'm getting data from a remote object how would i display it? Hers's what i have thus far (and you'll have to excuse my beginner skills here): mx:DataGrid id=masterList doubleClickEnabled=true doubleClick=this.currentIndex=this.masterList.selectedIndex; if(this.masterList.selectedItem!=null) { WindowManager.add( getDetailComponent(this.masterList.selectedItem.ProductionID), this, false ); } width=100% height=100% top=0 left=0 right=0 bottom=0 mx:columns mx:DataGridColumn dataField=ProductionTitle headerText=Production Title / mx:DataGridColumn dataField=ProductionType headerText=Production Type / mx:DataGridColumn dataField=Description headerText=Description mx:itemRenderer mx:Component mx:Label height=100 mx:htmlText How do i bind Description data here? /mx:htmlText /mx:Label /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid The data in the Description field is all in HTML, and i want to display it as rendered HTML rather than plain text. Thanks again, David -- 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] Re: How to render HTML text in data grid column?
I would create an ItemRenderer and use either a Label or a Text tag, both have an htmlText property. No all the html tags are available tough. --- In flexcoders@yahoogroups.com, envidobi [EMAIL PROTECTED] wrote: Hi all, Anyone know how i could display HTML text in a datagrid column? Haven't seen any examples or tutorials on the subject. Thanks, David -- 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] Re: How to render HTML text in data grid column?
OK, Here is an example : ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ [Bindable] public var myArray:Array = [{colA:'A',colB:'B'},{colA:'A1',colB:'B1'}]; ]] /mx:Script mx:DataGrid id=myGrid dataProvider={myArray} width=100% height=50% variableRowHeight=true mx:columns mx:Array mx:DataGridColumn dataField=colA headerText=Column A width=70/ mx:DataGridColumn dataField=colB headerText=Column B width=50 wordWrap=true mx:itemRenderer mx:Component mx:Label height=100 mx:htmlText ![CDATA[This is font color=#FFHTML text/font in a bText component/b. Using the uhtmlText attribute/u of the font color=#008800Text component/font you can use basic HTML markup.]] /mx:htmlText /mx:Label /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:Array /mx:columns /mx:DataGrid /mx:Application --- In flexcoders@yahoogroups.com, Oscar [EMAIL PROTECTED] wrote: I would create an ItemRenderer and use either a Label or a Text tag, both have an htmlText property. No all the html tags are available tough. --- In flexcoders@yahoogroups.com, envidobi envidobi@ wrote: Hi all, Anyone know how i could display HTML text in a datagrid column? Haven't seen any examples or tutorials on the subject. Thanks, David -- 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] Re: How to render HTML text in data grid column?
Hi Oscar, Thanks a bunch for replying. I've had about 10 posts now and i've not gotten a single reply. Thanks for your time! :) I get what you're doing but if i'm getting data from a remote object how would i display it? Hers's what i have thus far (and you'll have to excuse my beginner skills here): mx:DataGrid id=masterList doubleClickEnabled=true doubleClick=this.currentIndex=this.masterList.selectedIndex; if(this.masterList.selectedItem!=null) { WindowManager.add( getDetailComponent(this.masterList.selectedItem.ProductionID), this, false ); } width=100% height=100% top=0 left=0 right=0 bottom=0 mx:columns mx:DataGridColumn dataField=ProductionTitle headerText=Production Title / mx:DataGridColumn dataField=ProductionType headerText=Production Type / mx:DataGridColumn dataField=Description headerText=Description mx:itemRenderer mx:Component mx:Label height=100 mx:htmlText How do i bind Description data here? /mx:htmlText /mx:Label /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid The data in the Description field is all in HTML, and i want to display it as rendered HTML rather than plain text. Thanks again, David -- 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/