jquery - issue while Calling same Editor Template with Telerik control multiple times -
my work on mvc3 razor, scenario
have editor template has telerik dropdownlist control in it.
requirement display same telerik dropdownlist multiple times editor template calling
editorfor(m=>m.assignee.options,"optionslist") editorfor(m=>m.assignee.options,"optionslist")
so if this, style both controls rendered properly, "functionality" of telerik ddl gets affected second control(it doesn't drop @ all), first 1 works fine.
afterwards, tried use other control (here control's working based on jquery teleriks) , repeated above scenario. same result.
first control got rendered , worked properly, rest of repeated controls broke.
found out issue becoz of script(jquery) used controls in editor template.
question is, possible use jquery based control in editor template , make work mulitple times in same page?
if solution or link can refer to?
i think due name , id attributes having same values.
in editor template try making name , id attributes unique.
@(html.telerik().dropdownlist() .name(viewdata.templateinfo.getfullhtmlfieldname(string.empty)) //unique .htmlattributes(new { id = viewdata.templateinfo.getfullhtmlfieldname(string.empty) + "_wrapper" }) //unique .selectedindex(...) .bindto(...) )
Comments
Post a Comment