We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

combox in template

Hello,
     I've been working on a project where in i wanted to have a detail temple for the Grid. i define the template this way:
<script type="text/x-template" id="detail-template">
    <div class="detail-info">
        @{<ejs-combobox id="${fieldname}-${id}" dataSource="@ViewBag.data" placeholder="Select a game" index="2" popupHeight="230px">
                <e-combobox-fields text="Game" value="Id"></e-combobox-fields>
         </ejs-combobox>}
    </div>
<script>

when i ran the website this is what shows up for the combobox <input id="ACHNO-77760">
how can i make the ejs-combox work in templates?


Thanks in advance,
Marvin

3 Replies

MS Madhu Sudhanan P Syncfusion Team October 31, 2018 07:37 AM UTC

Hi Marvin, 

Thanks for contacting Syncfusion support. 

We cannot use ASP.NET Core Tag helper inside the grid template. Essential JS 2 ASP.NET Core controls uses ES6 like template syntax which is compiled and executed using Essential JS 2 Template engine.  



To render other components inside grid cells, please go through the below link, in which dropdown is rendered inside grid cell. You can use the same procedure to render combobox. 
  


Regards, 
Madhu Sudhanan P 



MP marvin Permano November 1, 2018 03:44 AM UTC

thank you so much! this saves me a lot of time


MS Madhu Sudhanan P Syncfusion Team November 1, 2018 06:27 AM UTC

Hi Marvin, 

Thanks for the update. We are glad that your requirement has been achieved. 

Regards, 
Madhu Sudhanan P 


Loader.
Live Chat Icon For mobile
Up arrow icon