AS3 Datagrid multiple selection - actionscript-3

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.

Related

Can we change "rowSelection" dynamically in Ag-grid angular?

I am displaying data using Ag-grid in angular 8 with checkbox in first column. I need to set rowSelection:"single" to allow single data edit at a time and need to switch it to "multiple" for allowing download multiple selected data. Lets say I have two buttons "Edit" and "Download".
How can I switch this attribute "single" to "multiple" and vice-versa dynamically on clicking these two buttons? Or what would be another way to handle this situation.
Any suggestion or solution would be appreciated. Thanks
Example:

Saving selected items in Listbox combined with radio button into new field

I am trying to combine multiple selection criteria into one new field. This can be a text box or listbox, whatever is handy to work with.
I do not know how to attach a zip file with my access database so I will send a pictures to show my access form.Access Form
At the top you are able to filter the database on various criteria and the results will show up in the ListBox beneath.
Then you are able to choose one of the calculation options or select an item in the Listbox or create your own value. By choosing one of the radio buttons above I clicking the save button I would like the following to happen.
Columns 0 to 4 from the selected item in the ListBox should be saved in a box underneath.
The value of the selected option from the radio button should be saved next to it (as column 5)
Columns 6 to 9 from the selected item in the ListBox should be saved next to it.
If the user did not select an item in the ListBox there should be a popup that he should select an item.
The user should be able to perform multiple searches and save all the selected items for each search, so at the end the user has an overview of all the items he has saved.
I hope my question is clear, otherwise just let me know!
Thanks in advance,
Vinesh
I was able to make a work around by using an append query.
Now it is possible to save the selected item in the listbox combined with the selected option of the radio buttons.
Sadly every time you hit the button you are asked if you agree on making a change in the table and that the rows will be updated.
Is it possible to either turn these two messages off, or to find a direct way of saving the data into the table?

Set unbound combo box to match on full string for not in list event

I have an unbound combo box that gets it's row source values using a select query in VBA. The values shown are filtered by other selections on the form. If a value entered is not on the list I have a prompt to ask the user if they would like to add a new record. So far this has worked without any problems.
I overlooked one issue. If the "new" item is a partial match the selection defaults to the partial match entry. (Ex. I want to add part 4321437 but part 4321437-01 is already present.) How can I get the field to match using the full field?
I have tried playing with auto expand, allow value list edits, show only row source values, and inherit value list. Nothing seems to stop it from auto-filling. I have also tried clicking out of the field versus tabbing out.
If I remove my for key-down event that displays the list options with the arrow keys, it works. However, the customer would like to keep that feature.
Is there a way to have both?
Thinking outside the box, perhaps consider using a TextBox in place of a ComboBox.
This way, using the AfterUpdate event, you would have full control over how the entered value is handled: test for a match in your dataset using a simple query and branch accordingly.
You could even cycle through existing options by successively populating the TextBox with existing values from your dataset on the KeyDown event triggered by the arrow keys.
I found a way to have both. In my Key Down Event, I check if the down arrow is pressed. If it is, I display the drop down menu.
If KeyCode = vbKeyDown Then
Me![cboNewPart].Dropdown
End If

Two renderers in same adavanced data grid in Flash builder

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.

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.