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

Foreign key drop down selected value using Jquery to send input value to cascading drop down

1 Answer 144 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Senthilkumar
Top achievements
Rank 1
Senthilkumar asked on 22 Jun 2015, 06:23 PM

Hi Team, 

 Please let me know how to get the foreign key drop down (InstanceTypeIds) selected value using Jquery to send input value to cascading drop down (InstanceId) of grid row.      @(Html.Kendo().Grid<Flextronics.DevFactory.Ingrex.Entity.IngrexDataEntity.IngrexGlobalNewRequest>()

    .Name("GridGlobalNewRequest")
    .Columns(columns =>
    {
        columns.ForeignKey(p => p.InstanceTypeIds, (System.Collections.IEnumerable)ViewData["listofinstanceTypes"], "InstanceTypeId", "InstanceTypeName").Title("InstanceType").Width(120).EditorTemplateName("InstanceTypeIds");
        columns.ForeignKey(p => p.InstanceId, (System.Collections.IEnumerable)ViewData["listofInstance"], "InstanceId", "InstanceNm").Title("Instance").Width(120).EditorTemplateName("InstanceId").Width(120);
        columns.Bound(p => p.StartCompany).Title("Start").Width(90);
       // columns.Command(command => command.Edit()).Width(80).HtmlAttributes(new { style = "text-align:center" });
        columns.Command(command => command.Destroy()).Width(80).HtmlAttributes(new { style = "text-align:center" });
    })
            .ToolBar(toolbar => {
                toolbar.Create();
                toolbar.Save();
            })

    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable(page => page.Enabled(true).PageSizes(new int[] { 10, 50, 100, 500}))
    .Sortable()
    .Scrollable()

    .DataSource(dataSource => dataSource
                .Ajax()

                .PageSize(20)                

                .Model(model =>
                {
                    model.Id(p => p.InstanceTypeIds);
                    model.Field(p => p.InstanceId);
                    model.Field(p => p.InstanceTypeIds);
                })


            //.Create(update => update.Action("EditingInline_Create", "NewRequest"))
            //.Read(read => read.Action("EditingInline_Read", "NewRequest"))
            //.Update(update => update.Action("EditingInline_Update", "NewRequest"))
            //.Destroy(update => update.Action("EditingInline_Destroy", "NewRequest"))

                .Create("EditingInline_Create", "NewRequest")
                .Read("EditingInline_Read", "NewRequest")
                .Update("EditingInline_Update", "NewRequest")
                .Destroy("EditingInline_Destroy", "NewRequest")

    )

    )

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 25 Jun 2015, 07:31 AM

Hello Senthilkumar,

Where are the cascading dropdownlists? As the cascading functionality will not work with incell edit mode. Otherwise if you want to get a value of the dropdownlist, you can use the edit event of the grid and select the dropdownlist in the event handler using:

e.container.find("[data-role=dropdownlist]").getKendoDropDownList()

Regards,
Kiril Nikolov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Senthilkumar
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or