We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dropdown click event is not woking

<input type="text" id="drpDashboard" ej-dropdownlist e-fields-id="id" e-datasource="dashBoardViewModelList" e-fields-text="dashboardName" e-fields-value="id" e-width="100%" e-select="getDashboard" e-create="oncreate" e-value="selectedDashboard" e-selecteditemindex="0"></input>

Can you provide dropdown with  mouse  click event. on selection of any item of dropdown.


can you provide me example of synchfusion dropdown example with angular js
with rebind of with data.

for example on page load binding is done after some action like button click I want to rebind it with new dynamic data source

so can you provide me example with  update the the datasource of dropdown.

other wise its better to close your product. it just a waste of time to use your product.




1 Reply

SN Sasikala Nagarajan Syncfusion Team July 29, 2015 09:43 AM UTC

Hi Bharat,

Thanks for using Syncfusion products,


Can you provide dropdown with mouse click event. on selection of any item of dropdown.

We would like let you know that, in DropDownList client side event“select” will trigger whenever we select the item in dropdown list popup. From this event's arguments we can get curently selecteditem value,text,id.
Please refer the below code snippet

<input id="bookSelect" ej-dropdownlist e-datasource="dataList" e-select="valueSelect" e-value="value" />

function select(args) {
// we can get value,text,id from args
}


can you provide me example of Syncfusion dropdown example with angular js with rebind of with data

We can achieve your requirement by setting our DropDownList data Source property value dynamically using DropDownList object.
Please refer the below code snippet to know about setting datasource and mapping corresponding fields dynamically.

function bindData(args) {

target = $('#bookSelect').ejDropDownList("instance");

target.option("dataSource",NewList);

target.option("fields",{id:"empid",text:"text",value:"text"});

}




We have prepared the sample based on your requirements in dropdown. Please check with the below link

http://jsplayground.syncfusion.com/nfwy4azv

In this sample, We have rendered the dropdown list control with carslist[[List] dataSource using ej angular directive and provide one button to change the new dataSource Dynamically. In that button click event we have accessed the dropdown list instance and changed the dropdown list’s dataSource with new dataSource BooksList[NewList] and mapped its corresponding fields.

Also, we have showcased the select event of dropdown list in this sample.

Please check with the given samples and code snippet and let us know if you have further queries,

Regards,

Sasikala Nagarajan

Loader.
Live Chat Icon For mobile
Up arrow icon