This is a migrated thread and some comments may be shown as answers.

Multiple Select Lists same Datasource

1 Answer 93 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 22 Mar 2017, 08:08 PM

Greetings all,

 

I am attempting to have the same select list display on one page via MVC Display Templates. So far I've only been able to get one of the select lists to display at a time. Is this functionality not allowed. See my code example below:

 

    <div class="row">
        <div class="">@Html.DisplayFor(m => m.AgentSelector)</div>
    </div>
 
<div class="">
<p> a bunch of misc. data is here </p>
</div>
 
    <div class="row">
        <div class="">@Html.DisplayFor(m => m.AgentSelector)</div>
    </div>

 

The first one works. The second one does not. Is there a way to get this to work.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 24 Mar 2017, 12:46 PM

Hello Randy,

Display templates are supported. Although, I am not sure what special is there about the Display templates so to lead to possible difficulties. Generally, any of the shipped wrappers should be used the same way as if they are in a plain Razor page. 

Note that the output of the DisplayFor method depends on the Display templates you have implemented. Currently, as there is no information what is the exact code used for the templates, neither there is information what is the output you receive currently, I am unable to define what exactly is the problem you experience. 

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DropDownList
Asked by
Randy
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or