intercept when user click on expand all grouping ui grid - html

I use angularJS and ui-grid table .
I want create variable that change when user click on toggle for expand all grouping.
how to intercept when the user click on toggle for expand all grouping . thank's

Try this:
gridApi.grouping.on.groupingChanged(scope,function(col){})
Refer: http://ui-grid.info/docs/#/api/ui.grid.grouping.api:PublicApi

Related

Apply scenario on inline edit in table

Is it possible to apply to a scenario an inline edit action on a table widget?
I don't see the "Apply to scenario" toggle like in the button widget configuration.
Note: My table widget is based on a scenario.
So actually if you turn on the 'Load Data From Scenarios' toggle, and set the variable to your active scenario, any inline edits will be written to the scenario not the write-back.

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!

How to disable buttons on the selected value of the other in AngularJs

I have two buttons - Company Email and Non Company Email.
If i select the first , ng-click="flag='Y'" and the second one renders the flag value as 'N'
So now I am trying to disable them when they are selected so user is not allowed to click on the second time, the second click is creating some UI issues which I want to avoid here.
But the ng-disabled is not working at all as expected, it disables from the outlook but we can still click the button and it behaves strangely.
Pleas help-
Code block is added in comments
This seems like a simple enough issue where you would disabled the buttons using a scope variable set once a button is clicked.
<button ng-disabled="flag=='Y'" ng-click="doCompany()">Company Email</button>
Here is an example

MVC - override validation when one particular button is clicked

I have a table that lists items. I have a form tag that surrounds this table. In this table I have ADD buttons that adds new rows to the database. I have EDIT buttons that edits a row as well. The form posts to the same action on the controller.
Now I need to add a filter row on the first which means I need to add a Filter button to submit the form with the filter parameters. Since this is still inside the main form, I now have the following problem: When I click the Filter button, the inputs that are used for the ADD button are being validated before anything gets posted. How can I prevent the validation from occurring when the user clicks the Filter button?
Make sure the Filter button is of type "button" not "submit" and do filter using ajax
As i see it, the easy way would be to fire the submit via js with:
.submit();
The other way would be to disable validation on that form with this:
$('#form').validate({
onsubmit : false
});
or
$('#form').unbind('submit')
I have one suggestion. Name Add button inputs differently and add row using javascript/ajax. When posting, Add button inputs will not be validated because they have different names

How to make 1st item of html drop down box (select element) selectable

I have a standard html drop down box.
I want to run js code after the user selected an item without a separate submit button.
Onchange event does not fire when the user selects the 1st item (actually the previously selected item) in the select box.
How can I make the combo box react to the click even if the previously selected item is clicked?
Notes:
1. I don't want to add 'select from here' or something similar to the select box.
2. the onclick event does not help since it fires also on the 1st click the user does to open the options before actually selecting one.
I don't think this can't be done. onchange, as you correctly point out, doesn't work. onmouseup fires too early.
I think onblur would do the trick but it will also fire when the user tabs through the available elements.
If you really need this to work reliably, consider using a JavaScript based replacement widget like this one. They enable you to work around the notorious lack of flexibility that standard form elements unfortunately have.
Oh and by the way, the <select> element is not a combo box, it's a drop-down.
:)
You can use the onclick event but at the same time count the number of clicks.
<script type="text/javascript">
var count = 0;
function selectClicked(sel){
count++;
if (count == 2){
//the user has selected something
//so go ahead and handle it
count = 0;
}
}
</script>
What if you added the "onclick" event to the individual "option" elements rather than the "select" element?