flex:how to get input values on creation complete - actionscript-3

I have a datagrid,2 textboxes & a button .In the third textbox i want to display the total of one of the column in datagrid. The data in grid is populated on button click, depending upon the values in textbox. but until I get values on creation complete,I am not getting the total.If i do calculateTotal() on button click M not gettting total.what can i

Flex is an event driven framework. Use events by the controls and the IList used as data provider to determine the state of te ui and the data itself. So you can easily get notifications when new data is available, when data changed etc.

Related

How to handle Access DataSheetView selection change event..?

I have a Form with Default View Split Form enabled, so it will appear like picture below every time it loaded.
I also enable the page header to appear at the top which has a label to store some value (It will store Diff Amount value). What I want to do is, everytime user click on the datasheet view (and make record selection change or cell change) below the form header, I want to update the value of my label on the form header.
It's easy to change the value, but how to handle the datasheet view record selection, or datasheet view cell selection change.
In Excel, this is very easy to do, we can handled it from Worksheet.SelectionChange event, but how to do this in Access...?
Thanks in advance.
Simply use the form OnCurrent event, which fires whenever a new record becomes Current

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

How to Create a Continuous Form in Access VBA with variable number of Text Boxes

I know how to design a Continuous Form in Access VBA 2010 with adding a number of Text Boxes and setting the Form Default View as Continuous Form and then setting the Form's Record Source to a Query. So the data would be shown in a Grid Format perfectly. However, I want to add these Text Boxes dynamically, means the query that's going to be bound to that form would have variable number of columns everytime depending on the selection in filters. So, how can I do that?
I don't want to set the Table or a query directly as the source of that form as I won't have the freedom of conditional formatting also.
The easy method is to create the maximum number of textboxes to be displayed, then hide those that you do not wish to display for the current filter.

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.

Datagrid is scrolling up on data refresh

Here is what is happening:
I have a datagrid (which I am generating dynamically)
If I select a row and edit it (on clicking it opens a pop up and when i save data in that, I just update the data provider of the grid locally).
As soon as data provider of datagrid is updated, the datagrid scrolls up in a way so that selected row comes at the top of datagrid.
Has someone ever crossed this issue?
Thanks.
If you are using a
dataProvider.refresh();
Consider changing this to
dataProvider.itemUpdated(item);
The .refresh() sends a 'refresh' type event that causes the dataGrid to change. The itemUpdated(item) method does not dispatch this event.