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

Grid Edit Popup : Dropdownlist not working

0 Answers 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vikram
Top achievements
Rank 1
Vikram asked on 15 Apr 2011, 05:43 AM
Hi,
  I am not able to get dropdowns in the Pop up when i set the Grid's editing mode to Pop up. 
Also the "Model" in the  partial view  DisplayTemplates\Industry.ascx is throwing object not set to reference exception.


DisplayTemplate\Industry.ascx :

 

 

 

 

 

 

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<WebApp1.Models.IndustryType>" %>
<%= Html.Encode(Model.IndustryTypeName) %>

 

PFB the partial view of EditorTemplates\Industry.ascx:

 

 

 

 

 

 

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IndustryType>" %>
<%= Html.Telerik().DropDownList()
        .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
                            .BindTo(new SelectList((IEnumerable)ViewData["industry"], "IndustryTypeID", "IndustryTypeName", Model == null ? "" : Model.IndustryTypeID.ToString()))
%>

 

 

 

But the same code works perfectly fine when the editing mode of the grid is set to "InLine".

Any help??




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