Hi Malavika, Yes, this is quite possible that it is a bug in Flex 2. The DataGrid has always been an area of improvement for the guys at Adobe. And I am sure this is something that they might have fixed in Flex 3!!!
Regards, Venkat www.venkatv.com On Thu, Oct 9, 2008 at 12:39 AM, malavika <[EMAIL PROTECTED]>wrote: > > Hi Venkat, > I have tried with your code i still have the same issue. After > selecting value from ComboBox(change the combobox value of min 2 or 3 > rows), move the cursor out of datagrid(completely outside to datagrid) > upside/downside. An vertical scroll bar is happening on datagrid.I > have tried the same example in Flex 3 did not get this issue. I hope > this might be a bug in Flex 2. > > Regards, > Malavika. > > On Oct 8, 9:09 pm, "Venkat Viswanathan" <[EMAIL PROTECTED]> wrote: > > Hi Malavika, > > > > Try this change. This works: > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" > > height="100%" layout="absolute" > > verticalScrollPolicy="auto" horizontalScrollPolicy="auto"> > > <mx:Array id="arr"> > > <mx:Object label="User 1" data="1" selectedObject="0"/> > > <mx:Object label="User 2" data="2" selectedObject="0"/> > > <mx:Object label="User 3" data="3" selectedObject="0"/> > > <mx:Object label="User 4" data="4" selectedObject="0"/> > > <mx:Object label="User 5" data="5" selectedObject="0"/> > > <mx:Object label="User 6" data="6" selectedObject="0"/> > > <mx:Object label="User 7" data="7" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > <mx:Object label="User 8" data="8" selectedObject="0"/> > > </mx:Array> > > <mx:DataGrid width="452" height="40%" dataProvider="{arr}" > > horizontalScrollPolicy="auto" lockedColumnCount="4" x="141" y="119"> > > <mx:columns> > > <mx:DataGridColumn headerText="Name1" dataField="label" > > width="80"/> > > <mx:DataGridColumn headerText="Name1" width="100" > > headerWordWrap="true"> > > <mx:itemRenderer> > > <mx:Component> > > <mx:ComboBox selectedIndex="{data.selectedObject}" > > change="{this.data.selectedObject = selectedIndex}"> > > <mx:dataProvider> > > <mx:ArrayCollection> > > <mx:source> > > <mx:String>Data1</mx:String> > > <mx:String>Data2</mx:String> > > <mx:String>Data3</mx:String> > > <mx:String>Data4</mx:String> > > <mx:String>Data5</mx:String> > > </mx:source> > > </mx:ArrayCollection> > > </mx:dataProvider> > > </mx:ComboBox> > > </mx:Component> > > </mx:itemRenderer> > > </mx:DataGridColumn> > > <mx:DataGridColumn headerText="Name1" dataField="label" > > width="80"/> > > <mx:DataGridColumn headerText="Name1" dataField="label" > > width="80"/> > > <mx:DataGridColumn headerText="Name1" dataField="label" > > width="80"/> > > </mx:columns> > > </mx:DataGrid> > > </mx:Application> > > > > Regards, > > Venkatwww.venkatv.com > > > > On Wed, Oct 8, 2008 at 5:14 PM, Varun Shetty <[EMAIL PROTECTED]> wrote: > > > i meant stored in 'arr' Array > > > > > <mx:Array id="arr"> > > > <mx:Object label="User 1" data="1" selectedData="0"/> > > > <mx:Object label="User 2" data="2" selectedData="0"/> > > > ... > > > > > regards, > > > Varun Shetty > > > > > On Wed, Oct 8, 2008 at 6:45 AM, malavika <[EMAIL PROTECTED] > >wrote: > > > > >> When i make any change on ComboBox the value is stored.Actually the > > >> issues is when i select any one of the combobox and if i move cursor > > >> up/down of datagrid and vertical scrolling is happening for the > > >> datagrid....... > > > > >> Regards, > > >> Malavika. > > > > >> On Oct 8, 9:36 am, "Varun Shetty" <[EMAIL PROTECTED]> wrote: > > >> > recommend using an itemEditor since you are modifying value and want > to > > >> > store it. > > > > >> > Also, would advice you to store the value of the selected item on > the > > >> > original array. > > > > >> > You can still achieve this functionality using itemRenderer.. but > can be > > >> a > > >> > tricky functionality. > > > > >> > Search for itemEditor on Flex help and read about it. > > > > >> > read some details on modifying itemRenderers out here. > > >>http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1. > .. > > > > >> > I am curious, how others would treat this... would like to see a > sample > > >> > working code from people. > > > > >> > regards, > > >> > Varun Shetty > > > > >> > On Tue, Oct 7, 2008 at 3:25 PM, malavika < > [EMAIL PROTECTED]> > > >> wrote: > > > > >> > > Hi Venkat, > > >> > > Thanks for the reply.You didnot get my problem....actually... i > > >> > > have a datagrid for which i have been adding ComboBox using > > >> > > ItemRenderer.The dataprovider for the ComboBox is static one(as > you > > >> > > can see in the above code). When i change any one of the > > >> > > ComboBox.....and if i move mouse cursor down/up to my datagrid an > > >> > > vertical scrolling is happening on the datagrid. Just try to > execute > > >> > > the code and you can observe the scroll effect. > > > > >> > > Regards, > > >> > > Malavika. > > > > >> > > On Oct 7, 10:53 pm, "Venkat Viswanathan" <[EMAIL PROTECTED]> > > >> > > wrote: > > >> > > > Hi Malavika, > > > > >> > > > Well I think I understand what you are talking about. You are > saying > > >> that > > >> > > > suppose in the DataGrid you are showing say 10 records and at a > time > > >> only > > >> > > 6 > > >> > > > are visible. You check the 2nd record, move down using > scrollbars > > >> and > > >> > > when > > >> > > > you come back, the check is not there on the second row... Is > this > > >> what > > >> > > you > > >> > > > are talking about? > > > > >> > > > Basically you have to understand how list-based containers work. > As > > >> in > > >> > > this > > >> > > > case, Flex does not create 10 instances of the check box. It > just > > >> creates > > >> > > > only the number of items that are visible at a time (i.e 6 in > this > > >> case). > > >> > > > And every time you scroll, it just updates the data for each of > the > > >> item > > >> > > > renderers. And in your case, the data is getting updated, but > the > > >> > > checkbox > > >> > > > is not getting updated visually! > > > > >> > > > To tackle this problem, you can check the status of the checkbox > in > > >> > > > "override public function set data()"... In this method, you can > > >> check if > > >> > > > the boolean flag is true then check the checkbox, otherwise > uncheck > > >> it. > > >> > > > Please note that this could become very resource intensive in > some > > >> cases > > >> > > and > > >> > > > you have to be very careful while handling it. > > > > >> > > > Regards, > > >> > > > Venkatwww.venkatv.com > > > > >> > > > On Tue, Oct 7, 2008 at 9:15 PM, malavika < > > >> [EMAIL PROTECTED]> > > >> > > wrote: > > > > >> > > > > any Solution to resolve the issue??? > > > > >> > > > > Regards, > > >> > > > > Malavika. > > > > >> > > > > On Oct 7, 3:55 pm, malavika <[EMAIL PROTECTED]> > wrote: > > >> > > > > > Hi Everyone, > > >> > > > > > I'm surprised to come across such a issue in Flex 2,I > > >> have a > > >> > > > > > datagrid for which i have been adding ComboBox using > > >> > > Itemrenderer.when > > >> > > > > > i make a change on any of the ComboBox, later on if move the > > >> mouse > > >> > > up/ > > >> > > > > > down an automatic scroll is happening on datagrid.....I > could > > >> not > > >> > > > > > really control the behaviour. Run the below, you can observe > the > > >> > > above > > >> > > > > > behaviour. Could anyone tell me how to resolve the issue? > > >> > > > > > MyCode : > > >> > > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > >> > > > > > width="100%" height="100%" layout="absolute" > > >> > > > > > verticalScrollPolicy="auto" > > >> > > > > > horizontalScrollPolicy="auto" > > > >> > > > > > <mx:Array id="arr"> > > >> > > > > > <mx:Object label="User 1" data="1" /> > > >> > > > > > <mx:Object label="User 2" data="2" /> > > >> > > > > > <mx:Object label="User 3" data="3" /> > > >> > > > > > <mx:Object label="User 4" data="4" /> > > >> > > > > > <mx:Object label="User 5" data="5" /> > > >> > > > > > <mx:Object label="User 6" data="6" /> > > >> > > > > > <mx:Object label="User 7" data="7" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > <mx:Object label="User 8" data="8" /> > > >> > > > > > </mx:Array> > > >> > > > > > <mx:DataGrid width="452" height="40%" > > >> dataProvider="{arr}" > > >> > > > > > horizontalScrollPolicy="auto" lockedColumnCount="4" x="141" > > >> y="119"> > > >> > > > > > <mx:columns> > > >> > > > > > <mx:DataGridColumn > headerText="Name1" > > >> > > > > > dataField="label" width="80" / > > > > >> > > > > > <mx:DataGridColumn > headerText="Name1" > > >> > > > > > width="100" > > >> > > > > > headerWordWrap="true" > > > >> > > > > > <mx:itemRenderer> > > >> > > > > > > <mx:Component> > > > > >> <mx:ComboBox > > > > >> > > > > > <mx:dataProvider> > > > > >> > > > > > <mx:ArrayCollection> > > > > >> > > > > > <mx:source> > > > > >> > > > > > <mx:String>Data1</mx:String> > > > > >> > > > > > <mx:String>Data2</mx:String> > > > > >> > > > > > <mx:String>Data3</mx:String> > > > > >> > > > > > <mx:String>Data4</mx:String> > > > > >> > > > > > <mx:String>Data5</mx:String> > > > > >> > > </ > > >> > > > > > mx:source> > > > > >> </ > > >> > > > > > mx:ArrayCollection> > > >> > > > > > > </ > > >> > > > > > mx:dataProvider> > > > > >> > > </mx:ComboBox> > > >> > > > > > > </mx:Component> > > > > ... > > > > read more ยป > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

