Two renderers in same adavanced data grid in Flash builder - actionscript-3

i have a data grid which is having two renderers. one is text box and other is dropdwon. both are mxml rendered.
My requiremnet is when user edit the textbox value in a particular row i should make the dropdown value also changed of that particular row.
Could someone help me on this.
thanks

If this is spark:
The ItemRenderer has a property owner which is the dataGrid - you'll want to add an eventlistener on this (from the combobox one) - presumably coming from the other renderer which you dispatch from the owner point of view (eg: in textboxitemeditor: owner.dispatchEvent(RendererEvent.CHANGE, value))
In this listener - when the appropriate data was edited, you can update your combo box appropriately.
The key when doing something like this, is to remember to remove the listener and any other references you create in the dispose() method.
If this is halo:
It's essentially almost the same as above, the difference is there is a baseListData object which has the owner reference from the renderer.

Related

What is the name of the control MS-Access creates when generating a form with 1-M?

If you create a form on a table that has 1-M relationship with another table, MS-Access creates the form containing the fields of the "1" side as text boxe, etc. and for the M-Side, a tabular structure is created.
What is the name of the control representing the tabular structure? (it is some kind of a list but it is not like the list you select from the tool box!). This control does not have a click event. Why? It only has ON ENTER and ON LEAVE events, so how to capture the current row?
It is a form within the main form AKA sub-form. Although it appears to be a grid-view (Access call it datasheet view), it isn't. Therefore it does not have row based events. However, the sub-form has all the events like a normal form would.
There are few limitations in this "dataSheetView", no other controls are visible except text boxes. If you need a button, you must have a textbox with click events. Ideally place the textbox as first/last column so you have your action buttons.
Access also has a "ContinuousFormView" which can be decorated like a gridview with all custom controls. Again, they are forms and do not have row based events. Only control based or form based.
The object next to the question mark is a Subform/Subreport Container Control. As its name implies, it is a container that holds other objects which can be a table, query, form, or report. This control is also available for selection from the 'toolbox'.
Best to give the container control a name different from the object it holds, like ctrDocuments.
What do you mean by 'capture' the current row? A row is not referenced, fields and controls are referenced. Several ways to approach referencing fields and controls (if a form or report) of the dependent object. How depends on where you want to run the code. In a query? In the main form events? In the subform events? For example code in Click event of a button on the main form could be like:
strDoc = Me.ctrDocuments.DocPK

AS3 Datagrid multiple selection

I am working with Flash AS3 (not Flex) .
I have a datagrid with "allowMultipleSelection = true";
I want get and store the selected rows in my Data Base only when the row selection is completed using a button. (I don't want use "ListEvent.ITEM_CLICK" because a row can be selected and removed from the selection using the CTRL key)
How can I retrieve the selected rows in the datagrid?
Assuming you are using fl.controls.DataGrid, you can use the selectedItems property (it's an Array) to get (or set) the selected items when your button is clicked.
I had a datagrid which had checkboxes which use to get checked when a datagrid row was clicked. I wanted to allow multiple selections and also make the corresponding rows as checked or unchecked depending whether they are selected using shift key. I was able to do so by using the contains method of arraycollection and then checking the checkbox.

Flex Dynamic Component runtime Creation

I jus Want to know, how could be possible to create Dynamic Components in Flex run Time.
For eg: creating a combo box with change Handler Dynamically, text box Dynamically,
Now, the value of combo box and textbox should place in a VO Class and the VO class also to be created Dynamically,
user have to provide how many fields they need and wat are the components needed and according to tat Dynamic VO has to Create in run Time,
Hope This is clear,
kindly suggest me a Example, Thankxxx in Advance
To create Dynamic class is tricky.
As per your requirement you want some combo box with change Handler, text box, etc.
Once you know what component you have to display according to vo which is been created dynamically.
You can create One custom component which contains your all required component (i.e. combo box, , text box, etc. )
or
Can create different custom component. Selection is yours.
There should be one parameter/condition, which will decide which component should be displayed at run time. Like adding switch case or your own logic.
While creating combo box you can add addEventListner in actionscript to handle change even and can dispatch custom event or can perform your defined operation.
In the same way you can addEventlistner to your custom component (ex. – text box, checkbox, etc.).
There should be unique key for all if user want to create combo box unique key should be 1(sample/any dynamic value can be retrived from VO), text box unique key should be 2, etc…. it will help you while creating dynamic component.
Make sure while creating component you have to use concept of set and get method for passing parameter.
Create only required component by using proper Flex component life cycle.
Hope this may help you bit as rough understanding.. or can search for better approach..

Is there any way to focus on a cell of a DataGrid without setting it to editable?

I am currently working on making my Flex application accessible.
I have an mx DataGrid that I am using for showing complex data. Each row contains information about a person and one of the columns contains a button to "submit" that person's information.
Currently if I tab to the DataGrid, it has focus on the whole thing, but I cannot tab to individual cells. For accessibility purposes, I need the user to be able to tab to each of these cells to read the information. Everywhere I've looked I've found that it seems the only way to focus on an individual cell is to set the editable property to true. However, I do not want to make the field editable, as that information should not be changed.
At the very least I would like to be able to tab to the cell that has the button ItemRendender for each person. I could set the rest of the information in the accessibilityName of that.
Is there any way to accomplish this? Or am I going to have to find a more "creative" solution?
In case anyone is wondering how to get around this, the only way I could find is to switch over to an AdvancedDataGrid. If you set the ADG's selectable property to true, you can use the arrow keys to select a whole row at a time, and the screen reader will read the whole row of information.
Then to get the effect of clicking the row's button, I set a keyboard event watcher that performs the function of the button using the target(ADG)'s selected item when you press space.

Disabling Datagrid selection in flex

i have an array list of data which i am showing in spark data grid.
once i select an idem and click on a button that i have linked with datagrid it adds a panel on screen. I want to disable this selection i-e to tell that this item panel have already been added. Any ideas how can i do that?
best Regards
Try this.contains(child:DisplayObject) It Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself. The search includes the entire display list including this DisplayObjectContainer instance. Grandchildren, great-grandchildren, and so on each return true.
I think there's a .disable() function on datagrids, or you can use return false; so that it won't proceed.