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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

generic dropdown for mvc get selected value

Thread ID:





108410 Apr 18,2013 05:37 PM UTC Dec 8,2015 08:13 AM UTC ASP.NET MVC (Classic) 3
Tags: Tools
Asked On April 18, 2013 05:37 PM UTC

How I can get value using javascript and server side for selected generic dropdown. I have no problem to get the selected text.

Varalakshmi R.S [Syncfusion]
Replied On April 22, 2013 11:07 AM UTC

Hi helmishariff,


Thanks for contacting Syncfusion forums.


You can get the selected value of the GDD via script in the ClientSideOnClick event. “args._text “ returns currently selected items text. To retrieve the currently selected items text in serverside, first append the text to textbox and then access it in the action using its controls id. Please refer the below given code snippet to achieve this,



function ClientSideOnClick(sender, args) {

        var text = args._text;//return selected text





        public ActionResult Index(string genericdropdownId)


            //genericdropdownId returns text

            return View();




Kindly try the above methods and let us know if you have any other queries.




Replied On December 4, 2015 05:51 AM UTC


I am unable to get the value from selected DropDownList in JavaScript.

My Snippet:
    function FromCountryChange(sender, args) {  //here both object (sender & args) is null
            url: '/PurchaseRequest/GetListOfStates',
            data: { countryCode: 1 },
            error: function (a, b, c) {

            success: function (data1, b, c) {
                    dataSource: data1

@Html.EJ().DropDownListFor(model => model.FromCountry).CascadeTo("FromState").WatermarkText("Select From Country").AllowVirtualScrolling(true).VirtualScrollMode(VirtualScrollMode.Normal).DropDownListFields(f => f.Value("Code")).DropDownListFields(f => f.Text("Name")).EnableAnimation(true).EnableIncrementalSearch(true).CaseSensitiveSearch(false).Width("400").ClientSideEvents(evt => evt.Change("FromCountryChange")).Datasource(ViewBag.Countries)

Varalakshmi R.S [Syncfusion]
Replied On December 8, 2015 08:13 AM UTC

Hi Helmishariff,

Thanks for your interest in Syncfusion products.

We are able to retrieve the selected value from change event args “sender”. We have also prepared a simple sample to exhibit this behavior and the sample can be downloaded from the link given below,

You can refer the API reference details from the below given link,

Could you please try the sample and if the issue exists still could you please let us the version used in your application? Or please share the application in which this issue was reproduced. We will check the application and update the details to you.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon