PDA

View Full Version : [CLOSED] Adding MVC Dropdown in Grid Panel



RajivDutt
Mar 10, 2014, 6:15 PM
I want to use basic dropdownlist control in the Grid Panel.


List<SelectListItem> listItems= new List<SelectListItem>();
listItems.Add(new SelectListItem
{
Text = "One",
Value = "1"
});
listItems.Add(new SelectListItem
{
Text = "Two",
Value = "2",
Selected = true
});
listItems.Add(new SelectListItem
{
Text = "Three",
Value = "3"
});
}


@Html.DropDownList("listItems",listItems);

How can I put this control in one of the column of the Grid Panel and what are the pros & cons of this approach.

Due to some limitation of Ext.net SelectBox control, I have to go this way.

Thanks,
Rajiv Dutt

Daniil
Mar 11, 2014, 6:07 AM
Hi @RajivDutt,

Do you want to use it as a Column's Editor? Unfortunately, there is no way.