First of all you can see and download the plugin from here. A nice searchable drop down list for your web application is simple to implement now. Look at the country drop down below.
A drop down like this will be more user friendly as it provides more functionalities to the user. So lets see how we can implement this.
First you need to reference JQuery and then the chosen styles and the chosen js file.
and then add the drop down list to your page.
Now we need to apply chosen to this drop down list.
So you will get a final output like the following;
And it is more user friendly and very attractive for your application. Hope this helps. Happy coding.
A drop down like this will be more user friendly as it provides more functionalities to the user. So lets see how we can implement this.
First you need to reference JQuery and then the chosen styles and the chosen js file.
<script src="script/jquery-latest.js" type="text/javascript"></script>
<link href="/css/chosen.css" rel="stylesheet" type="text/css" />
<script src="/js/chosen.jquery.js" type="text/javascript"></script>
and then add the drop down list to your page.
<asp:DropDownList ID="drpCustomer" runat="server" CssClass="drpCustomercls" ClientIDMode="Static" ></asp:DropDownList>
Now we need to apply chosen to this drop down list.
$(".drpCustomercls").chosen({
"placeholder_text_single": "Customer"// Your placeholder here
}).change(function () {
var idCustomer = $(this).val(); // you can get the selected id from this.
});
So you will get a final output like the following;
(Sorry for blurred content)
And it is more user friendly and very attractive for your application. Hope this helps. Happy coding.
grate work..
ReplyDelete