Hi,

Im having datagrid it has two itemrenderer's
in firt item reneder Combox is their and in second a Image & a button
is their
about 200 rows of data will be loaded vertical scroll will appear as
it is large amount of data.

The problem here is When all the data is loaded it is fine and looking
cool but
when i scroll the datagrid rapidly up and down or if i resize the
datagrid, the data of item renderers is getting shuffled and images
disappearing from the columns automatically
Even this problem coming to list, tilelist when item render is used

Why it is happing so, weather these things wont support large amount
of data

<mx:DataGrid id="dataGrid"
                        dataProvider="{dataArr}"
                        rowHeight="70"
                        rowCount="8"
                        editable="true"
                        resizableColumns="true"
                        headerRelease="setOrder(event);"
                        right="10" left="10" top="30" bottom="51"
                        >
                                <mx:columns>
                                        <mx:DataGridColumn headerText="Id" 
dataField="idCol" width="40" /
>
                                        <mx:DataGridColumn headerText="Name" 
dataField="nameCol" />
                                        <mx:DataGridColumn headerText="Content" 
dataField="contentCol"/>
                                        <mx:DataGridColumn headerText="Price" 
dataField="priceCol"
width="100" />
                                        <mx:DataGridColumn headerText="Label" 
dataField="labelCol"
                                                 sortable="false"
                                                 editable="true"
                                                 editorDataField="newState"
                         rendererIsEditor="true"
                         itemRenderer="components.Combo_box_Data">
                                        </mx:DataGridColumn>
                                        <mx:DataGridColumn 
headerText="ImagePath" dataField="imgCol"
                                                 sortable="false"
                                                 editable="true"
                                                 editorDataField="newValue"
                         rendererIsEditor="true"
                         itemRenderer="components.ImageRenderer">
                                        </mx:DataGridColumn>
                                </mx:columns>
                </mx:DataGrid>


ImageRenderer.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"; >
        <mx:Text id="del_txt" text="{data.imgCol}"  width="104"/>
        <mx:Image id="k" source="{data.imgCol}"/>
        <mx:Button label="ChangeImage"/>
</mx:HBox>


Combo_box_Data.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml";
creationComplete="init()">
        <mx:Script>
        <![CDATA[
                import mx.events.DataGridEvent;
                import mx.controls.Alert;
                [Bindable]
                public var newState:String = new String();
                private function init():void{
                        cmb.dataProvider=parentDocument.combdata;
                        for(var i:int=0;i<parentDocument.combdata.length;i++){
                                
trace(parentDocument.combdata[i].labelCol,"==",data.labelCol);
                                
if(parentDocument.combdata[i].labelCol==data.labelCol){
                                        
trace(parentDocument.combdata[i].labelCol,"==",data.labelCol);
                                        cmb.selectedIndex=i;
                                        break;
                                }
                        }
                        cmb.addEventListener(Event.CHANGE,changeItem);
                }
                private function changeItem(e:Event):void{
                        newState = cmb.text
                }
        ]]>
        </mx:Script>
        <mx:ComboBox id="cmb" labelField="labelCol"/>
</mx:HBox>

Plz Suggest me where im doing wrong

Thanks,
Regards,
Nagarjuna


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to