bloo
bloo

Reputation: 35

cant get value from dropdown list(kedo drop down)

I m a newbie on jquery UI. Can you please tell why

$('#ddlPanel').data("kendoDropDownList").select($("#ddlPanel")[0].selectedIndex);

Didn't fetch me value after a post back.

I will make that simple. on selecting any value from dropdown, the value should be retained after onclick.

I have tried the above one but results with an undefined value.

<select id="ddlPanel"> <option value="0">Select Business Unit</option> . . </select> This is from .cshtml $('#ddlPanel').data("kendoDropDownList").select($("#ddlPanel")[0].selectedIndex)‌​;

And i used the above jquery to retain the value after postback

Upvotes: 0

Views: 55

Answers (1)

Dhara
Dhara

Reputation: 1972

You can do $("#ddlPanel").data("kendoDropDownList").text(); or $('#ddlPanel').data("kendoDropDownList").value(); to get value from DropDownList.. You can refer jsfiddle

Upvotes: 1

Related Questions