Angular 6 Dropdown Change Event








Select All / None feature. IntegralUI ComboBox is a native Angular 2 component that replaces the standard HTML element. This task will be done just like primary and foreign key relationships in which id is working as a primary key and did is working as foreign key. When you build applications you will need to communicate between components, while services are a good way to share data between components, there are specific methods to carry out parent-child component communication. HTML select element with AngularJS data-binding. In this article, we will try to fill the state dropdown on selection change of country and then fill the city dropdown on change of state dropdown. Angular 2/4/6/8 Multiselect Dropdown. Join a community of over 2. May 28, 2019 · Angular Event Binding – Part 1 – Day 12 May 28, 2019 shethvivek Leave a comment When a user performs any action like clicking on a button , hovering over an element , selecting from a dropdownlist , typing in a textbox etc, then the corresponding event for that action is raised. It is called a Template Expression. StackBlitz - The online code editor for web apps. Dec 11, 2015 · Binding to drop downs is always interesting. This method filters the forecasts list based on the selected value and then returns the result. using ng-change is a tiny bit more performant, since it uses one less watch expression. You can attach to them using the. Declarative templates with data-binding, MVW, MVVM, MVC, dependency injection and great testability story all implemented with pure client-side JavaScript!. ui-dropdown. In a pure HTML-based form, there is virtually no work to do; the browser takes care of all the heavy-lifting. Reactive forms is an Angular 6 technique for creating forms in a reactive style. This page was generated by GitHub Pages using the Architect theme by Jason Long. Angular Components - The Fundamentals Last Updated: 26 April 2019 local_offer Angular Core Although the Router part of Angular is still changing a lot, the public API for building components is already quite stable. You can create your own theme from now on. Here we will show / hide elements based on dropdown list selection item by using ng-change event directive in angularjs applications. How to Refetch FullCalendar Events and Resources on select change event? In this post, I will tell you, Refetch FullCalendar Events and Resources. x) using the latest Angular docs. Bind Select DropDown List in AngularJS 2 Bind Select DropDown List in AngularJS 2. edit - If ngFor redraws the array of option values, the index keeps incrementing, so you can't use it to pull the correct object from the array ("searchResults" in this case). That's what Angular event binding is all about. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. Whenever user will change the value of drop down, then this event will be called and the values of the table will also be changed. module('myModule', ['ui. Jul 15, 2015 · Here I will explain how to use AngularJS to get dropdownlist selected value and text using ng-change event with example or use dropdown list ng-change event to get selected value and text using AngularJS with examples. Angular dropdown is not any big deal; it's the same as Angular 1 but here there are some differences of approach. Dec 07, 2014 · Cascading drop-downs are a hierarchical ( parent-children ) relationship exists among multiple html drop-down components. Today, Angular leverages advancements made in modern web development to create web applications for desktop browsers,. It will not be evaluated:. Oct 17, 2018 · Angularjs Dropdown onchange Example – AngularJS ng-change Event with Checkbox Select Text Example. Dropdown style and Icon Change we can also customize/override the default styles and icons, There is a predefined style to change it. When the onClick event is. The key is to examine the event object. To set the default value of the. Take notice that all of the code to listen to key events will be on the TypeScript side of the component unlike the local click events in the template. AngularJs get dropdown selected value : It is very simple to get the selected value from dropdown list. You will usually need this for custom implementations of drop-down lists, context menus, …. Demo for events in Kendo UI DropDownList component R1 2019 Release is here. You can achieve this behavior by using ej2-tooltip component. Angular Bootstrap select is a component that displays a collapsable list of multiple values which can be used in forms, menus or surveys. To get full look of the control, include one of the themes in your application. css; Include the default. Below is the code. Angular dropdown select/options ngFor enum Introduction The article will show how to use ngFor, ngModel [Angular] Windows authentication with Web API Angular ASP. 0 is out and earlier I posted about creating an Angular 8 app with Visual Studio 2019, which will help you to get started with Angular 8. The first step is creating your Angular project using Angular CLI. You can therefore subscribe to valueChanges to update instance variables or perform operations. posted on November 22, 2016 by long2know in angular, plunker. Website Demo. The Angular app name is angular-dependent-dropdown. When the onClick event is. In this part of the tutorial, we are going to work with change event with Select Dropdown in Angular. FusionCharts Suite XT uses JavaScript to render charts in the browser using SVG and VML. Line # 16: Here we are just using a click event which will call when the user needs to reset the records. Nov 12, 2019 · Select Dropdown Change Detection with Angular 8/9. The DropDownBox widget consists of a text field, which displays the current value, and a drop-down field, which can contain any UI element. module('myModule', ['ui. Differences between Angular and AngularJS. Angular Bootstrap navbar Angular Navbar - Bootstrap 4 & Material Design. Set to outline to add border instead of underline (applies only to Material theme) appendTo: string: null: no: Append dropdown to body or any other element using css selector. Refer to themes and theming section below Documentation | Demos / Examples. Data obtained from user actions such as keystrokes, mouse movements, clicks, and touches can be bound to component property using event binding. Angular is a platform for building mobile and desktop web applications. Angular doesn't run change detection because no event is fired. Dropdown-type widgets abound in the web development space. In this chapter, we will discuss how Event Binding works in Angular 4. 1: Creating an Angular project with Angular CLI. Angular 6, Part 3: Lifecycle of a Component ngOnChanges - This event executes every time when a value of an input control within the component has been changed. DropDownList options with tooltip. In below block, we have declared 3 functions each for change event of CheckBox, TextBox and DropDown respectively. FusionCharts Suite XT uses JavaScript to render charts in the browser using SVG and VML. In Angularjs ng-change is the best event to hook the function to get the second dropdown list items. Use orderBy filter to sort the content of the table when table header gets clicked. I don't have any issues with the button event just seems like the dropdownlist and the listbox doesn't fire events. NET MVC By Brij Mohan This article explains how to create cascading dropdownlists with AngularJS , Entity Framework Database First approach in ASP. Easy to integrate and use. 6m developers to have your questions answered on Angularjs: binding onChange events to dropdownlist elements in scheduler custom template of Kendo UI for jQuery Scheduler. i have populated name, age, company in the drop-down and when user selects name, and if he enters anything in the textbox provided will be filtered by name, and if the user wants to search by age, he selects age in the dropdown. These events need to be handled to perform some kind of action. Binding the input onchange event does not work (change) level 2. When a user interacts with an application in the form of a keyboard movement, a mouse click, or a mouseover, it generates an event. It will not be evaluated:. It is possible to integrate the two frameworks through the AngularJS directives for Kendo UI. As mentioned in Using Angular 2's Model-Driven Forms, each form control exposes the valueChanges event, which we can subscribe to. A simple autocomplete component for Angular and Bootstrap. FullCalendar is great for displaying events, but it isn't a complete solution for event content-management. You can use an ngFor directive in Angular 4 to loop through an array of data and bind the data to an element in your application template. The ng-change event is triggered at every change in the value. Data binding using Async pipe. https://blog. Jul 09, 2017 · Angularjs 2 Cascading Dropdown/Select. 0 or later version, here is the cleaner way that states on the UI-Bootstrap documentation. Coming from a web development background, you may be confused to find so many different layout types at your disposal: StackLayout. Angular apps are built as a hierarchy of components. Thus, Angular first handles mobile development. Angular Bootstrap select is a component that displays a collapsable list of multiple values which can be used in forms, menus or surveys. When user selects the value in dropdown one extra column has to add in table head using angular 7 ? How Add new column in thead on drop down change event in. Include below markup in your parent component Define required optionGroups from your parent component class as below Create dropdown. Website Demo. For correct positioning body should have position:relative: bindValue: string-no: Object property to use for selected model. Next Recommended Article. 0 onwards, you need to include default. Jun 13, 2018 · (change): This is a change event. Using TypeScript to the fullest we'd do something like this to signify the type of event value we are emitting, and our change output is of type EventEmitter. You can therefore subscribe to valueChanges to update instance variables or perform operations. If you have any questions or comments, drop me a comment in the comments section. Feb 24, 2018 · In this tutorial, we will see how to : 1. Angular Components - The Fundamentals Last Updated: 26 April 2019 local_offer Angular Core Although the Router part of Angular is still changing a lot, the public API for building components is already quite stable. This page was generated by GitHub Pages using the Architect theme by Jason Long. since angular knows it should only call the expression on change events it doesn’t need to keep evaluating it on every digest cycle, as opposed to, well, a watch. Bind Select DropDown List in AngularJS 2 Bind Select DropDown List in AngularJS 2. Getting Started. edit - If ngFor redraws the array of option values, the index keeps incrementing, so you can't use it to pull the correct object from the array ("searchResults" in this case). Sep 22, 2013 · Cascading DropDownList with AngularJS and ASP. In this post we will show you Best way to implement Dynamic Dropdown List Using Angularjs With Php, hear for AngularJS Multiselect Dropdown List using PHP & MySQL with Download. Custom Form Controls in Angular There are many things that Angular helps us out with when creating forms. Refer to themes and theming section below Documentation | Demos / Examples. We just learned that a “change” means “new reference”. restrict}} {{doc | humanizeDoc | directiveBrackets}} View Demo View Source on Github. Custom Direction for the dropdown (top, bottom, left, right). DropDownList options with tooltip. Today, Angular leverages advancements made in modern web development to create web applications for desktop browsers,. So in this post, we'll find out how to bind select dropdown list in Angular 4 and 5. Net Web API service and use the data to populate a SELECT Dropdown list. Change Column Header Text Dynamically. Change event fire every time value. Validation messages are displayed only after the user attempts to submit the form for the first time, this is controlled with the submitted property of the app component. Angular multiselect dropdown. I can only get one event handler to fire yet the example and. i have populated name, age, company in the drop-down and when user selects name, and if he enters anything in the textbox provided will be filtered by name, and if the user wants to search by age, he selects age in the dropdown. It's a angular directive for bootstrap dropdown, named 'bsDropdown' The bsDropdown include all basic function in dropdown, include set default value, and listen change etc. When a user interacts with an application in the form of a keyboard movement, a mouse click, or a mouseover, it generates an event. I have created a working example for you. Today, We want to share with you. Join now and share your views and answers on Syncfusion Developer Community for the thread: Angular - How to bind selected item in a dropdown list in to a. Use this property to change the default setting if the default does not work well for the current culture, device, or application. GitHub Pages using the. i have populated name, age, company in the drop-down and when user selects name, and if he enters anything in the textbox provided will be filtered by name, and if the user wants to search by age, he selects age in the dropdown. In this article, I’ll show you how to use ng-options directive in AngularJS to dynamically bind or populate JSON array to a DropDownList. Although angular 5 is the recent version, but Angular 4 is still used in many projects. Angular Material 2 currently offers 16 UI components, which is not enough for commercial applications. An Angular 4 menu is is a responsive and touch-friendly dropdown which is coded using a the latest Angular JavaScript framework. AngularJs Events. Angular1 was followed by Angular2, w. see code below. Also support multi-select on newest version. value event change angular2 angular typescript How do you explicitly set a new property on `window` in TypeScript? How can I check which version of Angular I'm using?. I used [selectedIndex]="selectedIndex" for this purpose But the value is not gett. No matter what you call them: combobox, select box, multi-select, they all accomplish basically the same thing: selecting one or more items from many. The ngChange expression is only evaluated when a change in the input value causes a new value to be committed to the model. Today, We want to share with you. 2017/03/05 by Sebastian Viereck. In Angular, a component can emit an event using @Output and EventEmitter. By default, the Popper position is set to bottom. This task will be done just like primary and foreign key relationships in which id is working as a primary key and did is working as foreign key. Jun 16, 2016 · Created: 16 June 2016. An Angular 4 menu is is a responsive and touch-friendly dropdown which is coded using a the latest Angular JavaScript framework. (i set the id as the value, since i think it's better suited. Here Mudassar Ahmed Khan has explained with an example, how to use populate HTML Select DropDownList with selected option using AngularJS. noop: A callback to a function that provide that name for each group when using group-by attribute. Although it may seem terribly inefficient, the Angular 2 change detection system can go through hundreds of thousands of simple checks (the number are platform dependent) in a few milliseconds. Use this property if you want to de-couple the value shown in the input element from the values shown in the drop-down list. Essentially you can you {{value}} to refer to the current value, so pass this as an argument to your change function, and revert the field if you don't like what you did. is a special input component with a drop-down of all possible matches to a custom query. How can I change an Angular 5 Material Select dropdown (mat-select) to one of the options in typescript code/file? So I have an Angular 5 Material Data Table with on it 2 filter options, one via text input and one via dropdown to filter on a particular field value. Bug tracker Roadmap (vote for features) About Docs Service status. You can achieve this behavior by using ej2-tooltip component. Spread the word and download it now! TL;DR Angular 2 introduces a reinvented change detection system that drops. Use this property to change the default setting if the default does not work well for the current culture, device, or application. In this article, we are going to create a cascading dropdown list in Blazor using Entity Framework Core database first approach. Highlighted code in the below snippets is the newly added code to the fetchdata. AngularJS lets you create dropdown lists based on items in an array, or an object. A click, hover, or a keyboard action are all events that you can use to call component logic within Angular. NET MVC By Brij Mohan This article explains how to create cascading dropdownlists with AngularJS , Entity Framework Database First approach in ASP. Angularjs - How to cancel change event on dropdown when the confirm dialog is false?. Before we start the angular project, we need a working environment. Bind Select DropDown List in AngularJS 2 Bind Select DropDown List in AngularJS 2. May 07, 2015 · Here, in the input box, the observable property is searchText and each time you change input value of the input text handleSearch will get executed and if there is any result it has got from its consumer to display, it just open the drop down and display the result from where we can choose. x using Visual Studio 2017 I restarted the tutorial and the click events are now working. Work with select dropdown in Angular 7/8/9 If there is a change in the app, Angular will perform Useful List of Angular 7 Event Types for Event Binding. Creating Angular Application. when the checked. Angular 7 Select Dropdown - Learn to create, validate Angular Select Dropdown and Multi-select dropdown with Reactive Forms. You just need to set a value for the ng-options with item. Technologies used include PHP, MySQL, AngularJS, Material Design a. I can only get one event handler to fire yet the example and. 6m developers to have your questions answered on Angularjs: binding onChange events to dropdownlist elements in scheduler custom template of Kendo UI for jQuery Scheduler. Join now and share your views and answers on Syncfusion Developer Community for the thread: Angular - How to bind selected item in a dropdown list in to a. In this post, we'll see how to bind select dropdown list in Angular 8 app by extending the same app. The ng-change event is. download angular 7 select change event free and unlimited. In Angular, a component can emit an event using @Output and EventEmitter. jQuery UI Widgets › Forums › Lists › DropDownList › Select/Change event creating many requests to server Tagged: Angular 2 dropdownlist , angular dropdownlist , cascading dropdownlist , DropDownList , dropdownlist triggers multiple calls on select/change , event , jQuery DropDownList , jqxDropDownList , select , server , Server request. MVC DropDownListFor fill on selection change of another dropdown bind child dropdown on change of parent dropdown item? bind dropdown on selection change? bind dropdown by using jquery? how to return json from action method in controller? how to format child dropdown items cascading dropdownlist in gridview edit mode cascading dropdownlist in. Based on the current speed of development, it seems that Angular Material 2 will need another year to complete. Version 20 is available for download now, take it for a free two month trial. Let’s look at the template first in our component. Nov 19, 2016 · On this page we will provide angular 2 event binding example. The ng-options directive uses an array to populate the element. If we use immutable objects in our Angular app, all we need to do is tell Angular that a component can skip change detection, if its input hasn’t changed. You can populate an HTML element with options using the AngularJS ng-options directive. Angular 6 - Input restrictions in a form Introduction This article is going to describe how to restrict some values typing in a text box input field, We have used Angular 6 to develop this application using Visual Studio Code as the IDE, Let's see how to do it. The accordion directive builds on top of the collapse directive to provide a list of items, with collapsible bodies that are collapsed or expanded by clicking on the item's header. ts to write functions which will be called on change event so that other dropdown's value will get auto-populated. Select All / None feature. Today, Angular leverages advancements made in modern web development to create web applications for desktop browsers,. following events are providing by angular js which makes our task easy. I cant find how to replace the change method to execute code in the component when the user change selection Thanks!. 0 onwards, you need to include default. One day I was told that there were some issues with a drop-down list in one of our forms. The first step is to add the following import statement in app. Angular is a platform for building mobile and desktop web applications. The ng-change event is. Nov 16, 2019 · Interpolation in Angular 6 Interpolation is a technique that allow the user to bind a value to a UI element. This directive can be used to generate alerts from the dynamic model data (using the ng-repeat directive);. I have created a working example for you. Technologies used include PHP, MySQL, AngularJS, Material Design a. This is where event binding comes. The component package has a themes folder in node_modules at angular2-multiselect-dropdown\themes\default. Keywords : Angularjs dropdown change event example, Angularjs show hide div based on dropdown list value example, Angularjs dropdown onchange event example, Angularjs dropdown ng-change to get value Example. The ngChange expression is only evaluated when a change in the input value causes a new value to be committed to the model. Join the community of millions of developers who build compelling user interfaces with Angular. module('myModule', ['ui. At the time of writing this getting started guide, Angular version 6 was in RC release. ts with below content, which will take care of search. Set to outline to add border instead of underline (applies only to Material theme) appendTo: string: null: no: Append dropdown to body or any other element using css selector. HTML select element with AngularJS data-binding. Table of Contents 1. But with Angular, you need to do a little bit of the work. We used to have a target element in JQuery using which we could have easily detected if the clicked element is the same element or its outside that element. Here’s an example in Angular 2 … Template. Feb 24, 2018 · In this tutorial, we will see how to : 1. 2017/03/05 by Sebastian Viereck. ui-dropdown. To get full look of the control, include one of the themes in your application. We've covered several topics on Forms in Angular , like model-driven forms and template-driven forms. We then send a network request to the server. When you want to trigger an action on dropdowns or cell/range change , Angular 7, MySQL, Testing. The demo code gets its dependencie. Technically, a dropdown element is actually a select element and each menu item in the dropdown is an option element. AngularJS directive support for Kendo UI DropDownList. To handle such scenarios, angular provides compareWith input with and element. Here is the official website of Angular CLI. Detecting clicks on a component is easy in Angular 2: Just use the (click) event binding, pass a function from the component's instance and you are done. html with below content Create search-filter. The ngChange expression is only evaluated when a change in the input value causes a new value to be committed to the model. Table of Contents 1. x) using the latest Angular docs. Angular 6 is the most recent form of Angular - Google's famous Javascript UI framework for desktop and mobile applications development. The Angular app name is angular-dependent-dropdown. Nov 17, 2018 · In this model, I have created two model classes, first Department class is dedicated for department dropdown and second one employee class for second drop-down control. Dropdown style and Icon Change we can also customize/override the default styles and icons, There is a predefined style to change it. The expression is evaluated immediately, unlike the JavaScript onchange event which only triggers at the end of a change (usually, when the user leaves the form element or presses the return key). You can customize the appearance of the dropdown by using the cssClass property. Important Notice !! From v3. Angular - How to get the selected dropdown value Front End Video. Jun 23, 2019 · Angular is one of the most popular JavaScript frameworks out there, notably with enterprise systems. Every time we change our code, Angular CLI will recompile, re-inject if needed, and ask our browser to reload the page if it’s open. In this article, we will try to fill the state dropdown on selection change of country and then fill the city dropdown on change of state dropdown. Nov 06, 2016 · Are you looking for a simple angular component with option grouping and filtering? This might help. Change Column Header Text Dynamically. I am trying to keep a particular value as selected by default. On line 5, we use a NgFor to list the drop down options, looping over a products array in our model and making use of a product local variable. The select directive is used together with ngModel to provide data-binding between the scope and the control (including setting default values). All public events are relayed using the jQuery event system, and they are triggered on the element that Select2 is attached to. jquery,html,css,drop-down-menu. Angular apps are built as a hierarchy of components. I want when i change cmbAll selected value on cmbFruit [i] also change. ts with below content Create dropdown. NET MVC By Brij Mohan This article explains how to create cascading dropdownlists with AngularJS , Entity Framework Database First approach in ASP. see code below. In addition you can use some conditional css classes to highlight invalid fields to the user. No matter what you call them: combobox, select box, multi-select, they all accomplish basically the same thing: selecting one or more items from many. Angular dropdown is not any big deal; it's the same as Angular 1 but here there are some differences of approach. trigger() can become useful. In our case we are emitting a number type: import { Component, Input, Output, EventEmitter } from '@angular/core'; @Component({}) export class CounterComponent { //. Custom Dropdown component for Angular 2+ applications with multiple and single selection options. Net Web API service and use the data to populate a SELECT Dropdown list. In Angularjs ng-change is the best event to hook the function to get the second dropdown list items. Easy to integrate and use. Building web apps powered by Angular 2. Kendo UI for Angular. When a user interacts with an application in the form of a keyboard movement, a mouse click, or a mouseover, it generates an event. The select directive is used together with ngModel to provide data-binding between the scope and the control (including setting default values). I just started using datatable in one of my Angular 6 project, and I'm really lost when it gets to refresh my table over a selection in a dropdown menu. Here in this post I am sharing an example on how to extract data by consuming an Asp. Let's look at the template first in our component. ui-dropdown-trigger suppose to change the background color to green body. Thus, Angular first handles mobile development. Earlier I posted about how to bind select dropdown list in Angular 2, but its time to upgrade to Angular 5 as Angular 5 is the recent released version. Dropdown widget’s style and appearance can be controlled based on 13 different default built-in themes. You can create your own theme from now on. this tutorial is specially designed to help you learn angularjs as quickly and efficiently as possible. In this post, we'll see how to bind select dropdown list in Angular 8 app by extending the same app. Build and deploy a real-world app with MongoDB, Express, Angular, and Node (MEAN): reactive forms and custom validation. In angularjs we can apply ng-change event to input select or dropdown element. Data binding using Async pipe. We use this event to pass a template reference variable into a function to log user action. Angular does it quite quickly, so in most cases, while you’re switching your windows from the IDE to the Browser, it’ll already be reloaded for you. In the 6 th drop down, we are listing the records and tracking the items of the dropdown by FirstName proeprty. angular how to get a drop down selection input with options from the server 0 Angular 6 Cannot set a selected default value from database to a drop list, and cannot read property setValue() error. when the checked. Today, Angular leverages advancements made in modern web development to create web applications for desktop browsers,. Released on May 3, 2018, the release centre around making Angular tool chain unrivalled, and experiencing considerable development. Angular 2 multiselect dropdown component for web applications. or vice verca. Download and learn how this simple tournament script was made. Jun 23, 2019 · Angular is one of the most popular JavaScript frameworks out there, notably with enterprise systems. Jan 25, 2017 · Here is my exact code but when I change the dropdownlist nothing. Change Column Header Text Dynamically. With ng-repeat directive display content on table element and define ng-click directive on each header column for detecting click event on table header. nothing work any solution to pre select in primeng dropdown or to change the selected value without user click event ? i use angular 7 , primeng 7. If you want to establish yourself as a front-end or full-stack developer, you need to learn Angular. Bind Select DropDown List in AngularJS 2 Bind Select DropDown List in AngularJS 2. At the time of writing this getting started guide, Angular version 6 was in RC release. I am changing of events which will come in today date. Bind the data to the select list in Angular 5/4 using ngFor 2. select', 'ngSanitize']);. Thus, Angular first handles mobile development. Dropdown-type widgets abound in the web development space. Demo for events in Kendo UI DropDownList component R1 2019 Release is here. GitHub AngularJS Dropdown Multiselect based on Bootstrap's dropdown. We can't use it to get notified when the target's value changes, to do that we need to use something called Output Event Binding, more on that soon. ng-Click → It will call a method or function when user click any DOM element like Button, Div. dropdown: This event is fired immediately when the hide instance method has been called. My criteria/needs/desires for an Angular directive included most of the functionality provided in the old jQuery plugin: filtering, check/uncheck all, and Angular specifics like two-way binding, proper text labels based on selected items, and, of course, Bootstrap styling. Questions: I'm trying to get the value of a mobile number textbox to validate its input value using angular. gz Loading demo Angular 2 Dropdown Multiselect is maintained by softsimon. JSON adds a little slowdown to every action, and it turned out a few of my users had experience when they would loose Wi-Fi connection and the request would fail silently; What I did was just store the entire selection data in the html (long live json_encode()) and just. jQuery UI Widgets › Forums › Grid › get dropdown id instead for display name on change event of dependent dropdowns Tagged: angular grid , cascading , Cell , cellvaluechanging , getcellvalue , grid , jquery grid , jqxgrid , value. To get full look of the control, include one of the themes in your application. This project consist of various material components for Angular such as Multi Select box, Accordion, Autocomplete, Chips(Tags), Collapse, Colorpicker, Datepicker etc. In Angularjs ng-change is the best event to hook the function to get the second dropdown list items.