Checkbox DataGrid Item Render Issue
I have a DataGrid component that has a column with a checkbox
item render. The code at the end of this post is identical to the
code at the bottom of the tutorial on this page:
Tutorial
The creation complete method calls a PHP function using the
AMFPHP framework. The PHP function returns an array of MySQL rows.
When I created the application initially, I was using the HTTP
Service component that would return the data as an XML list and
then Flex would bring it in as an Array Collection. The only thing
I changed was how the records were getting returned to Flex, which
is using AMFPHP. Now the item render does not function properly. If
the first record returned had a value of "true" then all the
subsequent rows would have their check boxes checked. If it were
"false" then the subsequent rows would have their check boxes
unchecked. Why is it doing this? It worked the way it was suppose
to before.
Also I have a label component nested in the itemRenderer to
see if it matches the data in the MySQL database; which it does
match. Here is a screenshot of what exactly I am seeing:
Screenshot
Maybe the values being returned must be cast to Boolean
now?
Similar Messages
-
Hi everyone
I have a datagrid and a combobox in one of the column so i am
using item render for that but i am unable to populate data
dynamically into that rendered combobox
how can i do that, plz find me some solution
Regards
RajeevWhere is the data for the combo box?
Tracy -
Printing datagrid items or data
I have built an application that takes user input, searches
data in an XML file, and returns matches to a datagrid (with scoll
bars) on the stage. The next logical step would be to print that
data. Of course, the data could be one item or 100 items, so I have
no way of knowing how many pages would need to be printed. From
what I've read, this can be pretty dicey. Hence, I'm looking for
some general ideas about how to do it.Printing datagrids is a complex task and results are somewhat
substandard, but basically what you'll need to do is:
Determine how long the datagrid is (in pixels)
Determine how many pages long the datagrid is
Start a print job
Run a loop through the number of pages
Each loop iteration, update the position of the datagrid to
the next page
Force the datagrid to render before the next addPage call is
made
(flash does not update the screen when in a code loop)
Send the print job
Reset the position of the scrollbar.
A very basic (and ugly) version CAN be done in about 10-15
lines of code.
Good luck ;)
Cheers,
FlashTastic -
560GTX render issue help please
I've got the MSI 560GTX-Ti twin frozr video card in my Sandy Bridge system. It is NOT overclocked, I am running it at all factory resets. This is the second card I have received and they have both had some rendering issues. I'm using the latest drivers from Nvidia 266.66
Everything looks good in general usage, but when I play the game Rift (using High settings) I am getting some rendering artifacts. The card does not appear to be overheating as far as I know. I have run Furmark and it looks ok. Temps do go up to close to 70c but no graphic anomalies show up. In Afterburner the settings are all stock factory settings. At no time in the game does the fan seem to crank up to be audible.
I would include an image of the screen but don't know how. Basically the landscape will display square beams of texture protruding from random areas of the screen. Any ideas on what is going on and how it can be fixed?
Willax
edit: I ran Furmark right after getting the render issues in RIFT and the fur donut had some holes in it, the temperature was running close to 70c
Then I changed the fan speed from AUTO to 70 percent and the temp in Furmark dropped to a steady 65 but there were still render issues with holes and extended triangles in the donut.
It seems that this card is getting too hot and not rendering correctly, but it shouldn't be happening. I even turned the fan up to 100% and although it got loud the temp did not change
very much from 65cWell, I clicked those items and told it would be active after I started afterburner. I restarted and the voltage slider was not active. Nothing I clicked would let me do anything. I hadn't really planned on doing any o/c stuff with this card, but purchased it because of the GREAT reviews on it. I prefer to run at stock settings, and it's not giving me very good performance with those
I'm glad I got the extra year warranty on it and will probably call New Egg tomorrow to replace it. -
EBP PO : Unable to duplicate/copy item,GR_NON_VAL issue
Hello,
I am using SRM 5.O .
In Process PO when I go to create the PO with more than one line item following issue comes :
When I entered one line item and check its ok when I click on <b>Duplicate Selected</b> Item or <b>Copy</b> push button than check following error appears .
<b><i>Flag 'Automatic Settlement' at item level is different; Change not possible
Flag 'Invoice Expected' at item level is different; Change not possible </i></b>
Thanks ,
Sachin
null
nullHello,
I have debugged whole program and found when there is single line item everything is fine & when i clicked on <b>Duplicate Selected Item</b> the value of GR_NON_VAL indicator set in first line item and second Items indicator as it is blank .Where single line Item indicator was blank .
When I am copying the line item than its working OK .
Due to mismatch in items followinng program raise error message .
PERFORM downward_inheritance USING p_hgp_ecom
p_hgp_icom
p_guid
p_object_type
p_itm_icom
ls_igp_icom
p_changed
CHANGING ls_header.
Is there any idea why system behaving like this ?
Thanks,
Sachin -
Dear Experts,
While i create packaging in Handling unit ther is a tab of Additional Data in Sales and distribution.In that we have Item Category - Issue is i am inputing manual item category TAN but i want to pick automatically.
I am unable to find the setting for packaging Item category of Sales and distribution.
Plz provide your inputs.
Thanks
Shri...Apart from what Jignesh suggested, follow the following steps for automatic packing:
1 In the Shipping screen choose Pack/load - Pack delivery. You see the Change outbound delivery screen.
2 Enter the number of the delivery that you want to pack, or select one using the matchcode function
3 Press ENTER. You see the overview screen Change Outbound Delivery: Overview - Quantities.
4 Choose Edit, then Pack. You see the screen Pack Items
If you want to pack all delivery items that are not packed, choose Edit - Automatic packing.
In this function, you do not need to select any items individually. All items and shipping units of the selected delivery that are not packed are automatically placed at the disposal of the user exits for automatic packing.
If you only wish to have certain items in the delivery packed, choose Edit then Autom.pack items
With this function, you must select the items and shipping elements to be packed. Then, only the selected unpacked items are placed into an internal table.
If you have set the supplied example to active, the program automatically searches, in both procedures, for the respective shipping materials for the items to be packed.
Thanks & Regards
JP -
DataGrid Item Renderer loading duplicates after scroll
HI,
I have a report that loads into a datagrid, these reports are
about thumbnail images that are on a server.
I have a datagrid item renderer that loads the thumb nails.
When the grid first loads the first set of rows that are visible
display the correct images. But after I scroll the new rows have
images that are repeated and not the correct ones.
?xml version="1.0" encoding="utf-8"?>
<HBox xmlns="
http://www.adobe.com/2006/mxml"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
creationComplete="{init()}">
<Script>
<![CDATA[
import mx.controls.Image;
[Bindable]
[Embed(source="/images/folderBlack.png")]
private var folderIcon:Class;
private function suffix(url:String):String {
var i:Number;
if ((i = url.lastIndexOf(".")) > -1) {
url = url.substr(i+1);
return url;
private function init():void {
var fileSuffix:String = new String;
fileSuffix = '';
fileSuffix = suffix(data.filename);
var staticPortalImage:String = new String;
staticPortalImage = '/PULLIMAGE.php?type=small&id=' +
data.FileID +
'&path=' + data.filename +
'&server=MTI3LjAuMC4x&siteurl=L0F1dGhNb2R1bGU=';
var thumbNailImage:Image = new Image();
thumbNailImage.height = 80;
switch(fileSuffix){
case 'jpg':
thumbNailImage.source = staticPortalImage;
break;
imageContainer.addChild(thumbNailImage);
texttest.text = fileSuffix;
]]>
</Script>
<Text id="texttest" />
<HBox id="imageContainer" height="80" />
</HBox>Thanks
Great article I ended up getting rid of the creationcomplete
changing my init():void too override public function set data(
value:Object ) : void
and adding
super.data = value;
I was able then to clean up my code considerably.
Once again Thanks
Dean -
Hi all,
I need a help/suggestion in a datagrid item renderer. In a datagrid, for one particular cell (particular column of a row) i need to change the background color depending upon the condition.The color for particular cell not for the entire row or entire column, how can i achieve this ?
Thanks in advance.
HemanHere is my Scenario, in my datagrid the second column of the first row (987.93) background color depends upon some condtion. The remaning rows of column B depends upon the column C . If "the column C is OK" it will be green , "NOT OK" red. But the first row's second column color depends upon some other condition. How can i achieve this ?
-
I am going to make a ADG with around 7 columns 6 of which I am going to use checkboxes as Item renderers. Each of these 6 checkboxes renderers will be define in separate actionscript files as they will be updating different parts of the ADG data provider. Does this sound like the best option?
Well the only difference is that each checkbox effects a different attribute of the dataprovider of the ADG:
for example this renderer effects the isSelected attribute. I may want to set a different one , hope this explains it better
package
import flash.display.DisplayObject;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.text.TextField;
import mx.controls.CheckBox;
import mx.controls.advancedDataGridClasses.AdvancedDataGridListData;
import mx.controls.listClasses.ListBase;
* The Renderer.
public class CheckBoxRenderer extends CheckBox
public function CheckBoxRenderer()
focusEnabled = false;
override public function set data(value:Object):void
super.data = value;
if(super.data.isSelected == null){
data.isSelected = false;
data.isSelected = this.selected;
invalidateProperties();
override protected function commitProperties():void
super.commitProperties();
if (owner is ListBase)
selected = ListBase(owner).isItemSelected(data);
override protected function keyDownHandler(event:KeyboardEvent):void
override protected function keyUpHandler(event:KeyboardEvent):void
override protected function clickHandler(event:MouseEvent):void
super.clickHandler(event);
if(!data.isSelected){
data.isSelected = true;
}else{
data.isSelected = false;
override protected function updateDisplayList(w:Number, h:Number):void
super.updateDisplayList(w, h);
if (listData is AdvancedDataGridListData)
var n:int = numChildren;
for (var i:int = 0; i < n; i++)
var c:DisplayObject = getChildAt(i);
if (!(c is TextField))
c.x = (w - c.width) / 2;
c.y = 0; -
ADG/DataGrid prevent render even from firing immediately on property
Hi,
Is there any way to tell the ADG to not re-render itself immediately after a
propertyChanged even has been fired in the dataProvider?
I have quite a wide row (lots of cells) and lots of custom logic that updates
these dependent properties on each row. i.e. calculated columns. I am doing the
calculations at dataProvider level vs labelFunctions. On each "set" function of
one of my cells in the row I raise a "propertyChanged" event if the value was
changed. Tracing through what the ADG is doing I'm finding that its re-rendering
each time I raise this event even if its in the same row. Is there any way to
tell the ADG to wait a few milliseconds in case another propertyChanged event
comes in so as to render once instead of 10 times?
If there is no ADG option what is the best pattern for this assuming I want to
do this in my underlying dataprovider objects. Should I raise custom events and
fake a itemUpdated once I know there are no more changes? I don't see a clean
way to do this however since I never really know when I'm done, and using a
timer or something of this nature seems like a major hack.
-Tom
Rest of discussion from FlexCoders ...
Re: ADG/DataGrid prevent render even from firing immediately on propertyChange
You might try enableAutoUpdate and disableAutoUpdate on ICollectionView, not
sure if that has the desired affect or not.
You could also put custom events in your model objects and manually dispatch
collection events or call explicitly tell the grid when to update.
By "explicitly tell the grid when to update" do you mean manually calling
itemUpdated at the View level?. If so does the grid actually "know" to re-render
only that updated row? It seems to me that it always re-rendered all visible
cells regardless of what was changed. So passing null or a real row into
itemUpdated has the same results.
Also if I am to manully dispatch propertyChanged from my row, and I never really
know when I'm done updating all of my dependant cells is there any good way to
do this. i.e. Cell A update cell B and cell B update updates cell E, and this
can go on indefinatley. By catchign all property changed events at Row level and
using a timer of say 50ms i would almost guarantee that I wouldn't rethrow more
than a single propertyChanged event on any of the updated cells in a row. Do you
think there is a better way to do this?
Follow up finding,
Do 10 propertyChanged events from my dataProvider cause grid to refresh once or
10 times? My most recent observations show that it's just once, though for some
reason the first load invokes my labelFunction 3 times. Is there any point in
using enableAutoUpdate if grid appears to be 'smart' enough?>>And what about the the most important question, how exactly is TableAssetsViewSource defined in the XAML markup and what is
its Source property set or bound to? And what about the reproducable sample...?
Here is the Markup of the TableAssetsViewSource:
<Page.Resources>
<local:RETAILISOAMDDataSet x:Key="RETAILISOAMDDataSet"/>
<CollectionViewSource x:Key="TableRegionsViewSource" Source="{Binding tableRegions, Source={StaticResource RETAILISOAMDDataSet}}"/>
<CollectionViewSource x:Key="TableLocationsViewSource" Source="{Binding tableLocations, Source={StaticResource RETAILISOAMDDataSet}}"/>
<CollectionViewSource x:Key="TableAssetsViewSource" Source="{Binding tableAssets, Source={StaticResource RETAILISOAMDDataSet}}"/>
</Page.Resources>
The ItemsSource of the DataGrid is bound to the TableAssetsViewSource:
<DataGrid DataContext="{StaticResource TableAssetsViewSource}" ItemsSource="{Binding}" x:Name="TableAssetsDataGrid" AutoGenerateColumns="False" EnableRowVirtualization="True" Margin="15,10,10,10" RowDetailsVisibilityMode="VisibleWhenSelected" Grid.Column="1" HeadersVisibility="Column" CanUserResizeRows="False" IsReadOnly="True">
Just remember, this code was auto-generated with the drag & drop onto the Page, so I did little in terms of setting the actual bindings.
All in all, what I have done so far works as intended, except that when I want to add a row to the table it does not reflect, and that it only shows after refreshing/restarting the application.
I will try and put together a reproducable sample. -
I have made a short 1 min movie, and have rendered it. I want to download to youtube, but when I try to export using quicktime conversion, it shows render issues wherever I have text. Once I get cancel out, it shows no render problems.
When I remove the text, the render problem still remains. I can export with quicktime, but not sure youtube will allow this to be downloaded.Please define: "render issues" and also the phrase "Once I get cancel out"
-DH -
Datagrid Checkbox item renderer Issue.
Hi There
Recently I faced a requirement to have a checkbox inside a datagrid where I need to develop a music module with playlist management for ADOBE AIR based application.
For this I have searched and found a source to use Datagrid and Checkbox components which overrides some inbuild methods to give the required result..
But Finally I ended with one strange issue
When the check box is placed in the datagrid at 0 column index it works firne but if we place at any index ( I need it to be last colum ) the checkbox is not updating the display.
Source Flex Air project attached.
From the sample... While clicking on a row the left column checkbox is getting updated but Right remains same... when you scroll the Datagrid then the checkboxes are getting update when they are redrawn. I didn't found where to call the redraw for the right checkbox column.
Cany any one faced this strange issue. and found any solution ?????
If the Logic what I am following for a Playlist module is not good one then suggest if you guys know any other mechanism to develop a playlist management with datagrid and Checkboxes.
Message was edited by: ChintuBabuHi There
Recently I faced a requirement to have a checkbox inside a datagrid where I need to develop a music module with playlist management for ADOBE AIR based application.
For this I have searched and found a source to use Datagrid and Checkbox components which overrides some inbuild methods to give the required result..
But Finally I ended with one strange issue
When the check box is placed in the datagrid at 0 column index it works firne but if we place at any index ( I need it to be last colum ) the checkbox is not updating the display.
Source Flex Air project attached.
From the sample... While clicking on a row the left column checkbox is getting updated but Right remains same... when you scroll the Datagrid then the checkboxes are getting update when they are redrawn. I didn't found where to call the redraw for the right checkbox column.
Cany any one faced this strange issue. and found any solution ?????
If the Logic what I am following for a Playlist module is not good one then suggest if you guys know any other mechanism to develop a playlist management with datagrid and Checkboxes.
Message was edited by: ChintuBabu -
PrintDataGrid's DataGridColumn - Embedded image not printing when you use TextFlow in the item rende
I'm printing a datagrid using something like this...
<mx:PrintDataGrid
id="printDataGrid"
width="100%"
height="100%"
showHeaders="false"
borderVisible="false"
horizontalGridLines="false"
variableRowHeight="true"
dataProvider="{titles}"
>
<mx:columns>
<mx:DataGridColumn
itemRenderer="renderer.TitlePrintRenderer"
/>
</mx:columns>
</mx:PrintDataGrid>
TitlePrintRenderer.mxml has s:RichText component. I use RichText's textFlow property to render the text. The approach is working fine except that if the textFlow has embedded images (<img source=... />), the images are not printed!
Is this a bug? Is it a limitation? Has anyone come across this issue?
I'm using Flex SDK 4.5.1After struggling for 4+ days on using timer / events for printing PrintDataGrid with embedded images in RichText's textFlow, I tried your other suggestion... to convert <img> tags to InlineGraphicElement and give it Bitmap from image loaded from a .gif file. The approach works but the printout skips images in a few rows!
I've this test case in which, every time I print, it skips printing image in the second row! I also implemented this approach in a more complex test case and depending on the total number of rows, it would skip printing image in different number of rows. I'm suspecting that even if you construct InlineGraphicElement from bitmap loaded from an image, PrintDataGrid's renderer still skips printing image intermittently.
I would very much appreciate it if you could create small project from my following code and verify this behavior. I'm at my wit's end in getting this printing to work.
PrintImagesTest.mxml
=================
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600"
initialize="initData();"
viewSourceURL="srcview/index.html"
>
<s:layout>
<s:VerticalLayout
paddingLeft="20" paddingRight="20"
paddingTop="20" paddingBottom="20"
/>
</s:layout>
<mx:Button
label="Print"
click="printClickHandler();"
/>
<fx:Script>
<![CDATA[
import flash.utils.setTimeout;
import flashx.textLayout.elements.InlineGraphicElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import mx.collections.ArrayCollection;
import mx.printing.*;
import mx.utils.OnDemandEventDispatcher;
public var contentData:ArrayCollection;
private var embeddedImages:ArrayCollection;
private var numberOfImagesLoaded:int;
public var printJob:FlexPrintJob;
public var thePrintView:FormPrintView;
public var lastPage:Boolean;
private var textFlowNS:Namespace = new Namespace("http://ns.adobe.com/textLayout/2008");
public function initData():void {
contentData = new ArrayCollection();
var page:int = 0;
for (var z:int=0; z<20; z++) {
var content:Object = new Object();
content.srNo = z+1;
content.contentText =
"<TextFlow whiteSpaceCollapse='preserve' xmlns='http://ns.adobe.com/textLayout/2008'>" +
"<span>some text</span>" +
"<img width='53' height='49' source='assets/images/formula.gif'/>" +
"</TextFlow>";
contentData.addItem(content);
public function printClickHandler():void {
convertToTextFlow();
private function convertToTextFlow():void {
embeddedImages = new ArrayCollection();
numberOfImagesLoaded = 0;
for each (var contentElement:Object in contentData) {
extractImageInfo(contentElement.contentText);
if (embeddedImages.length > 0) {
loadImage(embeddedImages.getItemAt(0).source);
} else {
printData();
private function extractImageInfo(contentText:String):void {
var textXml:XML = new XML(contentText);
var imageList:XMLList = textXml.textFlowNS::img;
for each (var img:XML in imageList) {
var embeddedImage:Object = new Object();
embeddedImage.source = String(img.@source);
embeddedImage.width = parseInt(img.@width);
embeddedImage.height = parseInt(img.@height);
embeddedImages.addItem(embeddedImage);
private function loadImage(imageSource:String):void {
var loader:Loader = new Loader();
var urlRequest:URLRequest = new URLRequest(imageSource);
loader.load(urlRequest);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
private function imageLoaded(e:Event):void {
embeddedImages.getItemAt(numberOfImagesLoaded).bitmap = (Bitmap)(e.target.content);
embeddedImages.getItemAt(numberOfImagesLoaded).width = ((Bitmap)(e.target.content)).width;
embeddedImages.getItemAt(numberOfImagesLoaded).height = ((Bitmap)(e.target.content)).height;
++numberOfImagesLoaded;
if (numberOfImagesLoaded < embeddedImages.length) {
loadImage(embeddedImages.getItemAt(numberOfImagesLoaded).source);
} else {
// all the images have been loaded... convert to textflow
buildContent();
printData();
private function buildContent():void {
var contentIndex:int = 0;
for each (var contentElement:Object in contentData) {
if (hasImage(contentElement.contentText)) {
buildTextFlow(contentElement, contentIndex);
++contentIndex;
private function buildTextFlow(content:Object, contentIndex:int):void {
var textXml:XML = new XML(content.contentText);
var p:ParagraphElement = new ParagraphElement();
for each(var child:XML in textXml.children()) {
switch (child.localName()) {
case "span":
var span:SpanElement;
span = new SpanElement();
span.text = child;
span.fontSize = 10;
p.addChild(span);
break;
case "img":
var image:InlineGraphicElement;
image = new InlineGraphicElement();
image.source = embeddedImages.getItemAt(contentIndex).bitmap;
image.width = embeddedImages.getItemAt(contentIndex).width;
image.height = embeddedImages.getItemAt(contentIndex).height;
p.addChild(image);
break;
content.textFlow = new TextFlow();
content.textFlow.addChild(p);
private function hasImage(contentText:String):Boolean {
var textXml:XML = new XML(contentText);
var imageList:XMLList = textXml.textFlowNS::img;
if (imageList.length() > 0) {
return true;
} else {
return false;
private function printData():void {
printJob = new FlexPrintJob();
lastPage = false;
if (printJob.start()) {
thePrintView = new FormPrintView();
addElement(thePrintView);
thePrintView.width=printJob.pageWidth;
thePrintView.height=printJob.pageHeight;
thePrintView.printDataGrid.dataProvider = contentData;
thePrintView.showPage("single");
if(!thePrintView.printDataGrid.validNextPage) {
printJob.addObject(thePrintView);
} else {
thePrintView.showPage("first");
printJob.addObject(thePrintView);
while (true) {
thePrintView.printDataGrid.nextPage();
thePrintView.showPage("last");
if(!thePrintView.printDataGrid.validNextPage) {
printJob.addObject(thePrintView);
break;
} else {
thePrintView.showPage("middle");
printJob.addObject(thePrintView);
removeElement(thePrintView);
printJob.send();
]]>
</fx:Script>
</s:Application>
FormPrintView.mxml
===============
<?xml version="1.0"?>
<mx:VBox
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:MyComp="myComponents.*"
backgroundColor="#FFFFFF"
paddingTop="50" paddingBottom="50" paddingLeft="50"
>
<fx:Script>
<![CDATA[
import mx.core.*
public function showPage(pageType:String):void {
validateNow();
]]>
</fx:Script>
<mx:PrintDataGrid
id="printDataGrid"
width="60%"
height="100%"
showHeaders="false"
borderVisible="false"
horizontalGridLines="false"
variableRowHeight="true"
>
<mx:columns>
<mx:DataGridColumn
itemRenderer="MyPrintRenderer"
/>
</mx:columns>
</mx:PrintDataGrid>
</mx:VBox>
MyPrintRenderer.mxml
=================
<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:bslns="com.knownomy.bsl.view.component.*"
>
<s:layout>
<s:VerticalLayout
paddingLeft="5"
paddingRight="5"
paddingTop="3"
paddingBottom="3"
gap="5"
horizontalAlign="left"
clipAndEnableScrolling="true"
/>
</s:layout>
<fx:Declarations>
</fx:Declarations>
<s:HGroup
width="100%"
gap="5"
verticalAlign="middle"
>
<s:Label
text="{data.srNo}"
color="0x000000"
fontFamily="Verdana"
fontSize="10"
/>
<s:RichText
id="title"
width="700"
textFlow="{myTextFlow}"
color="0x000000"
fontFamily="Verdana"
fontSize="10"
/>
</s:HGroup>
<fx:Metadata>
</fx:Metadata>
<s:states>
<s:State name="normal" />
<s:State name="hovered" />
<s:State name="selected" />
</s:states>
<fx:Script>
<![CDATA[
import flashx.textLayout.elements.TextFlow;
[Bindable]
private var myTextFlow:TextFlow;
override public function set data(value:Object) : void {
if (value != null) {
super.data = value;
myTextFlow = data.textFlow;
]]>
</fx:Script>
</s:MXDataGridItemRenderer> -
Listview checkbox group item only one can be checked
I have a listview with checkbox , and grouped some checkbox, I need only can be checked for two checkboxes, but I use
private void Listview_ItemCheck(object sender, ItemCheckEventArgs e)
this.Listview.Items[0].Checked = !this.Paramlst2.Items[1].Checked;
this.Listview.Items[1].Checked = !this.Paramlst2.Items[0].Checked;
but it is not worked.
can anybody suggest me how to modify the code to realize item0 and item1 only one can be checked.
thanksHi Sunny,
According to your title, do you mean you only one checkbox is required to check?
And the code, it seems not clear to me. What is Paramlst2 stand for?Which control did you use ?
Could you help provide more information? It would be better to help us to understand your issue.
Have a nice day!
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hi all,
Yesterday I found a soultion to display my image in my datagrid column. Now the issue is that if i leave the screen and come back to my screen the images move one space like the row index is adding one count, it's not validating my if statement.
Any ideas?
Thanks
Johnny
<mx:DataGridColumn headerText="LOCK" dataField="ISLOCKED" width="40">
<mx:itemRenderer>
<mx:Component>
<mx:HBox horizontalAlign="center">
<mx:Script>
<![CDATA[
import mx.core.BitmapAsset;
[Embed(source="assets/images/lock.png")]
[Bindable]
public var lockImage:Class;
private function checkLocked():void{
if (data.ISLOCKED == 1){
var asset:BitmapAsset = new lockImage() as BitmapAsset;
img.source = asset;
addChild(img);
}else{
img.source = "";
addChild(img);
]]>
</mx:Script>
<mx:Image id="img" creationComplete="checkLocked()" />
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>Renderers get recycled. CreationComplete is rarely the event to use. See
the item renderers posts on my blog
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui
Maybe you are looking for
-
Preview issue. Send to iPhoto option is grayed out after Lion upgrade
Preview issue. Send to iPhoto option is greyed out after Lion upgrade. In Snow Leopard it was an option to send pics from Preview to iPhoto, but now it is greyed out if I right-click on the pic. I have searced and tried everything, but I cannot fix i
-
After waking my comp. why does it restart
it doesnt realy restart but the displays shut off and the power clicks and the drives spin like a restart, whats going on? this is when i have put the comp to sleep and then the next day or later that day i go to use it.
-
How can I use web fonts I purchased?
I purchased Avalon from Font Spring (http://www.fontspring.com/fonts/fontsite/avalon) and it came with web fonts. How can I use the web fonts I bought with Adobe Muse?
-
When I run the BAPI "BAPI_PBSRVAPS_GETDETAIL" .It gives me a short dump.
When I run the BAPI "BAPI_PBSRVAPS_GETDETAIL" .It gives me a short dump. Can anybody help me with this?
-
All components of fusion middleware in one domain - is this better approach
Pls advise, is this better approach to have all the components of Fusion Middleware (SOA, B2B, BPM, WebCenter, Content server) in one domain itself in cluster environment for production. If not, pls advise the better architecture for production envir