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

Ajax bound drop down using parameter

0 Answers 112 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
carlg
Top achievements
Rank 1
carlg asked on 20 Sep 2012, 12:22 PM
Here is my dropdown:

@(Html.Kendo().DropDownList()
        .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
        .DataValueField("TaxImpsnId")
        .DataTextField("TaxImpsnName")
        .DataSource(source =>
        {
            source.Read(read =>
            {
                read.Action("_AjaxMethod", "MyController", new { lookupId= 1 });
            }).ServerFiltering(true);
        })
)

My dropdown is actually a column in a Kendo grid.  Instead of hard coding the lookupId =1 that is passed into the Ajax method in the controller, I want to take it from another field on the grid of the currently selected row.

So when the user changes the row of the grid, the drop down should reload passing in the lookupId of the currently selected grid row to the controller.

Thanks for the help.

No answers yet. Maybe you can help?

Tags
DropDownList
Asked by
carlg
Top achievements
Rank 1
Share this question
or