Flash - Enable Tab Key Navigation On A Datagrid Where The Cells Are Custom Item Renderers?

May 26, 2011

This is a snippet of code in our custom item renderer which is in actionscript:

textCustomItemRendererTempForTab.tabEnabled=true;
textCustomItemRendererTempForTab.focusEnabled=true;
textCustomItemRendererTempForTab.setFocus();
Alert.show( "Without this alert focus goes to next grid " );
keyboardEvent.preventDefault();
keyboardEvent.stopImmediatePropagation();
keyboardEvent.stopPropagation();

Right now tab navigation works (on tab, focus goes to next editable cell) with the alert inserted in the code but I'm not sure why because I believe the alert in the code breaks the flow of event bubbling. However without the alert (which is what we are going for) the focus goes to the next grid in our UI.

You can see the attempts of trying to stop the event from going to other components. I have also tried to call preventDefault() and stopPropagation() on the datagrid when it receives a tab key event.

how to allow proper tab key navigation without an alert?

View 1 Replies


Similar Posts:


Action Script 3 :: Custom Image Item Renderers?

Jun 25, 2009

I have a custom item renderer which displays a different gif in the row depending on data value from the data object. When i set the image source url using the absolute path and not embedding it works fine however when i embed the images i find that when i scroll up and down the grid the images get messed up and sometimes sit on top of each other. why embedding images in my hbox item renderer is causing so hassle;

code
public var equipment:Image;
public var compr_icons:Bitmap = new AssetManager.COMPUTER_ICON;

.. do some logic
equipment.addChild(compr_icons);

View 1 Replies

Actionscript 3 :: Creating Custom Item Renderers In Flex?

Jun 14, 2011

while creating custom item renderers which interfaces we need to implement?

View 2 Replies

Flex :: Override The Column Item Renderers For The Datagrid Component Dynamically

Feb 24, 2011

I have a view component called viewBase where I defined a advanced datagrid with few item renderers for datagrid columns. Now I have a requirement where I need to use the same view viewBase component, but not required to use any item renderers.

how to override the itemrenderers which are declared in a view component?

View 1 Replies

Flash :: Check Spark DataGrid Cells' Contents Programmatically?

Jan 24, 2012

I'm using the Spark DataGrid for the first time and finding it generally very usable.There's something I'd like to do with the contents of my grid now that I've drawn it though and I'm a bit stuck as how to proceed.I'd like to make a function that runs through each cell of a certain column in the DataGrid, that checks each value against an Array of predefined values; if it finds a match, it should then highlight the cell as conflicting, by changing its colour.I know you can access a particular cell's item renderer, by using the getItemRendererAt() function, and passing the column and row indices. But I can't see how I would, for example, loop through the values in each column

View 2 Replies

Flex :: Use 2 Different Item Renderers In Mx:Tree?

Mar 20, 2010

How can I use multiple item renderers in mx:Tree depending on item's depth/level in tree?For example. For the first level items I want to use label with button and for second level items combobox

View 2 Replies

Flex :: Force All Item Renderers To CommitProperties?

Mar 5, 2010

I have an item renderer that checks an external source for display information. If that information changes, I want to force all item renderer instances to check it.

What's the best way for force all the item renderers in a list or grid to either commitProperties or execute some other method?

I've read that resetting the grid.itemRenderer property will make them all initialize. I've also received the suggestion to iterate recursively through all the grid's children and call invalidateProperties on all the UIComponents I find.

View 2 Replies

Flex :: Use Creation Complete In Item Renderers?

Nov 25, 2010

Can i use creation complete in item renderers, i have a data grid and i have kept every single cell as an item renderer. is it a good practice to use creation complete here. I fear events might fire up at wrong instances.

View 2 Replies

ActionScript 3.0 :: Combing CellRenderer Individually But Not Simultaneously For Cells In A Datagrid In A Flash Document

Nov 2, 2009

I am attempting to combine two AS files that are acting as cellRenderers individually but not simultaneously for cells in a datagrid in a Flash document I have created. The first styles the cells to have alternating row colors and the second allows for non-text content to be rendered. The issue is whenever I attempt to combine them the document reports errors with "super" and "override" among others.

[Code]...

View 1 Replies

Flex :: Triggering Item Renderers On Hover With DataGrids

Sep 27, 2009

I've got a client who has a list of items on a Datagrid. When the row is clicked, it sends the user to another page with details of that item. The client wants the rows to act like HTML links, where the color is purple when the link has been previously visited and its normal color if the row hasn't been clicked in the past. I've accomplished this with item renderers and SharedObjects. The application loads the visited ids into an array on start and the item renderer colors the individual cells if that row had been visited.

The issue here is that the client also wants the text color in the rows to turn white when the user rolls over the row. Because the item renderer sets the color, it doesn't respond to the default stylesheet for the datagrid. I can make it turn white on rollover of an individual cell, but we need the whole row to do it. Is there a way to trigger a function in all the item renderers in the row, or is there a better way to accomplish this?

View 1 Replies

Flex :: Set Up Item Renderers To Have The Created Only If They Are Displayed On The Viewport?

Jan 24, 2011

I have data ItemRenderers with DataGroup, but I have many items, and it seems to me that DataGroup create all of them not only those few displayed on users screen, which takes time and resources.

View 1 Replies

Actionscript 3 :: Flex / Using Multiple Item Renderers In A List

Feb 23, 2011

I'm trying to have multiple item renderers in a list, as I have several different types of objects that I want to display. I tried creating a new class that extends ListBase, and adding override public function createItemRenderer with my code within this function. I then instantiate the new class and give it my array of data as its dataProvider, but createItemRenderer is never called within my new class,

View 2 Replies

Flex :: Avoid Loads Of 'if Statements' In Item Renderers?

Aug 8, 2011

I have an item renderer for a list containing an image, label and a checkbox.These are visible depending on the dataProvider property of the list.E.g if an image is a premium image then display the premium label, if an image is a favourite then display a star etc.The problem is i have a massive if statement, and this doesn't seem good practice.

View 1 Replies

Actionscript 3 :: Refresh Item Renderers And Change Their State?

Feb 2, 2012

I have a list with time related data. the item renderers display this time. I would like to make the item renderers refresh their state/labels upon the tick of a timer.

to which event should I add a listener within the renderer, and how do I trigger such event from the list?

View 3 Replies

Flex - Spark List Reusing The Wrong Item Renderers?

Feb 9, 2010

I have a List component using multiple item renderers determined by the itemRendererFunction. When I set the data the first time, it works as expected. Then, when I set the data a second time with new data, it doesn't call the itemRendererFunction and tries to reuse the current renderers even though they don't match the data.Once I scroll, the function is called and the correct renderers are used. I tried calling invalidateDisplayList and such prior to setting the data, but that didn't fix the problem.

View 3 Replies

Actionscript 3 :: Implement An Object Pool For Flex Data/Item Renderers

Oct 6, 2010

You can hook into the creation of Flex 4 item renderers easily enough (through itemRenderer, or itemRendererFunction) allowing you to pull renderers from a custom object pool, but how would you put those renderers back into the pool?

I understand that layout virtualization does a form of object pooling, but I'd like a way to hook in to that. For example, when an itemRendererFunction has been assigned to a data group with a virtualized layout, item renderer construction is indeed deferred, but the instances are not re-used - I'd like to be able to intervene there, if possible.

But even in the case of normal virtualized renderers (where the instances are re-cycled) it would still be useful to be able to manage the pool manually. Pools could be shared between data groups, for example, to reduce the initial buffer required to populate each group.

Is there any way to know when Flex discards an item renderer instance? I have a sinking feeling that there is just no reliable way to tell - even though perhaps there should be.

View 2 Replies

Flex :: Merge Cells In A Datagrid?

Oct 14, 2009

Is there any way to merge cells (vertically and/or horizontally) in a datagrid? At least, for example, is there a way to show that certain datagridcolumns belong to one group. For example, I'll take three columns: column1, column2, column3. All these three should be grouped to the Category cell with a rowspan of 3 -- a "super header" if you will.

View 4 Replies

Flex :: DataGrid With Button In Cells?

Feb 15, 2011

How can I add a button control in cells of a datagrid? I'm looking to have a button in each row of one column in the datagrid. The datagrid control rows don't need to be selectable in any way.

View 1 Replies

ActionScript 2.0 :: Set A Size For My DataGrid Component's Cells?

Dec 20, 2009

How can I set a size for my DataGrid component's cells?

View 1 Replies

Flex - Vertical Align Cells In A Datagrid?

Sep 10, 2009

I'm having trouble vertical aligning text inside cells in a DataGrid in Flex. I tried this.setStyle("vertical-align", "middle) in an itemRenderer on the column but it doesn't seem to work. I tried verticalAlign as well.

View 5 Replies

Flex :: Merge Cells In DataGrid/AdvancedDataGrid In Adobe?

Aug 2, 2011

I need to merge the cells as shown in the picture:

View 2 Replies

Flex :: Error When The Scroller Of The Mx:Tree With Custom Renderers Is Scrolled?

Aug 24, 2010

I have created a custom multiline item renderer for mx:Tree component. Important to mention that my item renderer has two UITextFields in it. Sometimes (depends of the input data) only one of UITextFields must be shown, so when second UITextField is not needed I hide it and recalculate the height of my item renderer. According to my tests height is calculated properly.The problem occures when I do scroll of my tree. The error text is:

TypeError: Error #1010: A term is undefined and has no properties.
at mx.controls::List/adjustVerticalScrollPositionDownward()[E:dev4.0.0frameworksprojectsframeworksrcmxcontrolsList.as:1042]

[code].....

View 1 Replies

Flex :: Mxml - Change The Margins Inside Cells Of A DataGrid?

Nov 17, 2010

I am using the following code to insert a DataGrid object into a basic Panel:

<mx:DataGrid borderThickness="0"
height="120" dataProvider="{collection}"
rowHeight="12" fontSize="9"
showHeaders="false" verticalGridLines="false">
<mx:columns>

[Code]...

View 1 Replies

Flex :: DataGrid Editing Cells In Same Row Not Firing Collection Change Event

Mar 20, 2010

I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong?

View 1 Replies

ActionScript 3.0 :: Change The Color Of The Header And Cells And Fonts In DataGrid Component?

Aug 31, 2011

How to change the color of the header and cells and fonts in DataGrid component.

View 2 Replies

Flex :: Select Item In Details Form Dropdown When Datagrid Item Is Selected

Feb 15, 2011

I have this datagrid:

<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>

[Code]....

What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).

View 1 Replies

ActionScript 2.0 :: Display Item In Datagrid In Order It Was Chosen And Remove Selected Item

Jul 20, 2010

I am in search of finding a way to display shopping cart items in a flash 8 datagrid in the order it was chosen by the user & also to ability to delete an item if the user choses. Currently I have the items displaying however they are displaying in a position as it is stored and called in the array. [code]

View 5 Replies

Actionscript 3 :: Trigger Flex Piechart Item Click Event When A Datagrid Item Is Clicked?

Nov 4, 2011

Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.

View 3 Replies

Actionscript 3 :: Set The Yellow Focus Rect To A Movieclip To Enable Tab Navigation?

Jul 26, 2011

How to set the yellow focus rect to a movieclip to enable tab navigation? This is my current code:

mymc.tabEnabled = true
stage.focus = mymc

View 1 Replies

ActionScript 2.0 :: Image Entertainment Navigation - Enable Object To Push Away Another

Aug 16, 2006

I was looking around sites for navigation, and came across this: [URL]. I really like the way the menu with the four to five movies that scroll to the left and when hovering over them, the one you chose expands, pushes the other ones to the right of it away, and shows a description, stopping the movement. I'm thinking that this is partially the same concept as the infinite scroller, but how did they enable the object to "push" the other objects away? Tween class? [URL]

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved