This is a migrated thread and some comments may be shown as answers.
dropdownlist in grid editing
0 Answers 36 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Srikar
Top achievements
Rank 1
Srikar asked on 12 Apr 2012, 08:17 AM

Hi to All,

am doing a razor mvc3 app. we used telerik  editable grid in our project . i want to get drop down list fields  in editing ,adding 

what code i hve to change plz tell me.

my code 

.................View code:..........................
 columns.Bound(c => c.Sl_no);
            columns.Bound(c => c.Paymode).Width(150).ClientTemplate("<#= Empedit #>");
            columns.Bound(c => c.Dd_no);

.................Controller code:.......................... 
 public ActionResult Index()
        {
            ViewBag.PayMode = from i in db.MST_IND_DD
                              select i.PAYMODE;

                    retun view(db.EMP.Tolist());
}
then we added a Editor template in view folder then added a view (Empedit)

 
 .........Empedit ...........

@model string


@(
 Html.Telerik().DropDownListFor(e => e).BindTo(new SelectList(ViewBag.PayMode))
)

but ddl is not coming in editing plz help me how to resolve my issue.

Tags
Grid
Asked by
Srikar
Top achievements
Rank 1
Share this question
or