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

Grid mvc with 2 linked dropdown

0 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
pat
Top achievements
Rank 1
pat asked on 29 Aug 2012, 05:58 PM
Hi,

I have 2 dropdowns. A drop-down list and society people who work for the company selected. Change of the company, I want a filter for people who work for this company.
@(Html.Kendo().Grid((IEnumerable<EntrepriseViewModel>)ViewBag.Data)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.Id).Visible(false);
        columns.ForeignKey(p => p.IdCompany, (System.Collections.IEnumerable)ViewBag.CompanyList, "IdCompany", "CompanyName").HtmlAttributes(new { id = "CompanyDdl" });
        columns.ForeignKey(p => p.IdEmploye, (System.Collections.IEnumerable)ViewBag.EmployeList, "IdEmploye", "EmployeName").HtmlAttributes(new { id = "EmployeDdl" });
        columns.Command(command => command.Edit()).Width(200);
    })
    .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model => model.Id(p => p.id))
                        .Read(read => read.Action("Company_JSON_Read", "Home", new { id = Model.id }))
                        .Update(update => update.Action("Company_JSON_Update", "Home"))
  
    )
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    )


IdEmployeList must change after IdCompany change but how ?

Thanks

No answers yet. Maybe you can help?

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