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

[Solved] Grid Edit modal window dropdrownlist databind select method route value returns 0

0 Answers 17 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nixon
Top achievements
Rank 1
Nixon asked on 03 Apr 2012, 08:53 AM
Hi,

I have a grid, on edit or add row click, i pop up a modal window. In the model window i have a dropdownlist.
I want to populate the dropdownlist with a filter criteria. The below is what i did will no success.

       <td>
                <%= Html.Telerik().DropDownListFor(m => m.MainModuleID)
                                            .Name("ddlmAppMod")
                                            .DataBinding(databinding => databinding.Ajax().Select("GetApplicationModules", "MasterData",
                                                                                                              new { ApplicationId =Model.ApplicationId}))%>                                
        </td>

My method in the controller is as below :
 public JsonResult GetApplicationModules(int ApplicationId = 0)
        {}

When i check the controller method the value of ApplicationId is always 0

When i hard code
<%= Html.Telerik().DropDownListFor(m => m.MainModuleID)
                                            .Name("ddlmAppMod")
                                            .DataBinding(databinding => databinding.Ajax().Select("GetApplicationModules", "MasterData",
                                                                                                              new { ApplicationId =3}))%>

i get the applicationid=3

How can i pass 'Model.ApplicationId'

Thanks in advance.
Tags
ComboBox
Asked by
Nixon
Top achievements
Rank 1
Share this question
or