store a boolean for when the column header that reverses sorting order is clicked - actionscript-3

I have a datagrid and by default, you can click on the header of each column to reverse the sorting order. Is there a way to store a boolean to indicate that the sorting order was switched?
This is an image of when the header has been clicked and the down arrow indicates that the order has switched.

To detect when the user changes the sort, listen to the headerRelease event of the DataGrid (if using mx DataGrid) or sortChange event (if using spark DataGrid).

Related

Select row checkbox on each item select in Primefaces datatable cellEditor

When I select an item in datatable with editMode="cell" (e.g. inputText , selectOneMenu) only that specific component is selected which is normal, but I want to select to whole row when I click on it, not just the component.
my problem is kind of UI related, there are specific areas on the row when you click on, the whole row gets selected, but when you click on the component in the row, only that component gets selected not the row and if you're collecting the object in backing bean, you don't have that row object.
You can use the clientId from AjaxBehaviorEvent to get the index of the data.
ClientId is look like this
form:feeTbl:0:j_idt49
0 is the index. To get the index, you need to split it.

SSRS Report Builder 2012 - How to hide list based on field value?

I'm using Report Builder 2012 to create a report. I have inserted multiple text boxes and other controls inside a list box so that I can hide all the controls at once just by hiding the list box. I'm using a SQL Server stored procedure to fetch rows of data. I'm using below expression to hide/show the list box.
=iif(Fields!certificateType.Value = "CT", False, True)
It works fine but it only checks the first row of data. If certificateType field is "CT" in the first row of data, it shows the list box but it doesn't hide the list box back for the next row of data in which certificateType is not "CT". It seems like list box visibility only checks the first row of data and applies it for all the other rows as well. How can i check the visibility of list for all the data rows?
Okay, based on our chat I have updated this solution.
I mocked up some data that looks like this:
certificateType
---------------
AT
BT
CT
DT
ZT
I created a quick and dirty report with a list. In that, I added a rectangle with a textbox in it. I set the dataset for the list to the main dataset (DataSet1 in my case). I set the expression for the textbox to this:
=Fields!certificateType.Value
Image in design mode:
I clicked on the list, and in the Row Groups pane, I right-clicked the Details rows, and chose Group Properties. On the General section, I clicked Add to add a new group expression. Then I chose certificateType from the dropdown.
I moved to the Page Break section of the Group Properties dialog and ticked the Between each instance of a group check box. Click OK.
Now, the report will break for each instance of a certificate type that comes in the dataset. So, if you have ten different cert types in the data, you will get one page for each.
You can't see it in my image below, but there are 5 pages now.
Hope this helps!!

Input an ordered list of values in an HTML form

How can I create an HTML form for which the user indicates a list of values drawn from a set of values? I can provide the form with the set of values to choose from.
The user is not indicating a set of values: the order of the selected values is important (the values are to be in descending priority order).
It would seem that the multiple attribute on a select element would be useful. But the select element does not seem to have any means for indicating the order of the selections, nor does the POST of the form guarantee ordering of the selected values.
I don't know exactly what you want but you can try the HTML5 sortable plugin, which is now hosted on github.
It's as simple as an <ul> with a list of elements and the user drag and drop the elements. With the callback
$('.sortable').sortable().bind('sortupdate', function() {
//Triggered when the user stopped sorting and the DOM position has changed.
});
And you can read the elements in the correct order and make that you want with it (save to DB, etc).

lightswitch many to many checkbox filter

Hey guys I have a many to many checkbox where a user can select many cities. I have a dropdown list above for selected state. I want to bring back only the regions that belong to that state that is selected.
thanks
Have you considered using a List and Details Screen instead of a dropdown list? You would just need to add both the states and cities tables to the advanced data section.
However, if you really need to use a drop down box, it is very complex but can be done.
You will need to begin a new search screen and lay it out as follows:
Create a group to start. You will need to 'add data item...' and choose Property, StateTable. Name this 'State' and add it to the group.
Create a second group. Again 'add data item...' Choose Query, CitiesTable (All). Name this StateCities. In the side panel, click 'edit query' next to StateCities and set it up as follows:
Return to your design screen by clicking the 'back to -screenname-' just above the filter statement. You should now see three bold items in the sidebar to the left. The first will be your StateTable, the second will be your StateCites query and the third will be your single State query.
Click the dropdown button for the StateCities query and you will see the query parameters at the bottom. You have a parameter called 'id'
Click on the Id parameter from the sidebar and change the parameter binding property (shown on the right hand side bar) to State.Id. If everything has been done correctly, this should hook up to your state query id field.
Once this is hooked up, you should be able to save your screen and run your program with the desired results!

ms-access calculated controls

can someone give me an example of what a calculated control is in ms-access?
Say you add a text box to a form, normally it binds back to a specific field in a table, and its contents reflect the contents of that field. A calculated control does not refer to a specific field in a table, rather it displays the calculation done on one or multiple fields in the database. Sometimes, it may not use any fields.
Example of control source value from a calculated control
=[YearlySalary]/52
Presuming that there is a field called yearly salary in the table the form is based on.
A control that simply displays this field would have the following in the control source
YearlySalary
Note the control source for a calculated control starts with an =
you mean this?
Setting the Control Source of a control, generally a textbox, to a calculation creates a calculated control:
=1 * 2
=[TheDate] - 1
=[Stock] * [UnitPrice]
=DlookUp("TheField","TheTable","FieldX=1")
Different cases:
Text box control: here you may be using a trim("text") function to remove spaces and clean up the data--that process requires some calculation
List box control: a calculation may be involved in the query that comprises it's row source. The calculation could be the combination of some kind of cyclic function on a numeric field value which then dramatically changes the order of the data if so directed.
Command Button: a variable could change with the number of presses which in turn changes the command mode of the button. Could change the color of the button, or could hide the button after a certain number of clicks, or could change the column of the listbox that is sorted in a query--each click advances the sort to the adjacent column to the right.