Hi.
I have a dropdownList
@Html.EJ().DropDownList("containersList").Datasource((IEnumerable<DocTracerPortal.Models.Visual.VisualContainer>)ViewBag.containersSource).DropDownListFields(f => f.Value("parentId").Text("text")).CascadeTo("areasList,documentCategoriesList,documentCategoriesList,documentStatusList,documentActionList").EnableRTL(true).ClientSideEvents(e => e.Change("onItemContainerChange"))
I want to recover the dd id on the Event
function onItemContainerChange(args)
{
var currentTarget = args.currentElement;
var parentID = $(currentTarget)[0].id;
}
I used that kind of call to get the values from a treeview. I will have that event connected to multiple instances.
But, I cannot find the way to pass a parameter in the event call, for instance ClientSideEvents(e => e.Change("onItemContainerChange(verify)"))
And if I try to check args, args return the model value of the dropdownlist but it does not contain the object parent reference that triggers the event initially.
args
Object {
text: "ACT/NSW", selectedText: "ACT/NSW", itemId: 0, selectedValue: 1, value: 1…
}
cancel: falseisChecked: true
isInteraction: true
itemId: 0
model: Object
selectedText: "ACT/NSW"
selectedValue: 1
text: "ACT/NSW"
type: "change"
value: 1__proto__: Object
There is any way to do this.