Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Unable to use Select2 in CreateOrEditModal for entity #6946


User avatar
0
naurinrr created

Hi,

Modal manager is not populating the class or id for CreateOrEditModal generated by ASPNET RAD tool. I have to set parent of a select2 to the modal but unable to use class or id as the id is random generated value. I tried passing the id in Index.js which contains the button to load the create or edit modal but still does not work.

Please help!!

Thanks


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    ModalManager's modalClass script has an API that can control the Model.

    https://github.com/aspnetzero/aspnet-zero-core/blob/f72d4bf9ced778e06265f1c415a8553b10cbaf3d/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/wwwroot/view-resources/Areas/AppAreaName/Views/Languages/Index.js#L18

    https://github.com/aspnetzero/aspnet-zero-core/blob/f72d4bf9ced778e06265f1c415a8553b10cbaf3d/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/wwwroot/view-resources/Areas/AppAreaName/Views/Languages/_CreateOrEditModal.js#L25