NHK
NHK

Reputation: 107

Get Data attribute from kendo dropdown list in change event

I set data attribute for kendo dropdown list as below.

.HtmlAttributes(new {style = "width:100%", required = "required" ,data_id= item.Id})

I tried like this

$(this).data("id");

but it gives as "undefined". how I get this data attribute value in change event

Upvotes: 0

Views: 1450

Answers (1)

NHK
NHK

Reputation: 107

I Use as below and it works for me

this.element.attr('data-id');

Upvotes: 1

Related Questions