This question is locked. New answers and comments are not allowed.
I try to add a drop down list in the telerik mvc grid. In one of my grid column the drop down should be appear with data in all the rows.
Below is my code snippet. But it is not reflecting. Apreciate for any help
@(Html.Telerik().Grid(Model).Name(
"Grid").
DataKeys(keys => keys.Add(o => o.Account)).DataBinding(dataBinding => dataBinding.Ajax()
.Select("Edit", "Pap", new { mode = GridEditMode.PopUp, type = GridButtonType.Text })
.Update(
"Update", "Pap", new { mode = GridEditMode.PopUp, type = GridButtonType.Text })
.Delete(
"Delete","Pap")).
Columns(columns =>
{
columns.Template(@<text>
<input type="checkbox" name="ck"
value="Pap" class="chkPap"/>
</text>).HeaderTemplate(@<text>
<label>Pap</label>
<input id="chkallPap" type="checkbox" title="check all records" onclick="checkallPap();"
/></text>);
columns.Bound(o => o.Account);
columns.Bound(o => o.PrimaryEmail);
//columns.Command(commands => commands.Edit().ButtonType(GridButtonType.Text));
columns.Bound(o => o.OptionalEmail)
.ClientTemplate(Html.Telerik().DropDownList().Name(
"OptionalEmailDropdownlist")
.BindTo(
new SelectList
(GetOptionalEmail(),"PapDropdownListValue","PapDropdownListText")).ToHtmlString());
columns.Command(commands =>
{
commands.Edit().ButtonType(
GridButtonType.Text);
commands.Delete().ButtonType(
GridButtonType.Text);
});