initial Grid field by drop down Editor problem

3 posts, 1 answers
  1. iman
    iman avatar
    2 posts
    Member since:
    Jul 2015

    Posted 05 Aug 2015 Link to this post

    I have a Kendo grid with drop down lists  and its prefectly working but a one problem....

    my grid field Values doesn't change to drop down list new "selected index"..

    my Kendo Grid:

            .Columns(columns =>
                columns.Bound(C =>;
                columns.Bound(C => C.Maddah).ClientTemplate("#=Maddah.Name#");
                columns.Bound(C => C.Massum).ClientTemplate("#=Massum.Name#");
                columns.Bound(C => C.Tem).ClientTemplate("#=Tem.Name#");
                columns.Bound(C => C.Event).ClientTemplate("#=Event.Name#");

                columns.Command(C => { C.Destroy().Text("حذف"); }).Width(200);
            .ToolBar(toolbar =>
            .Editable(editable => editable.Mode(GridEditMode.InCell))
            .Groupable(g => g.Messages(M => M.Empty("برای گروه بندی؛ عنوان ستون مورد نظر را به اینجا Drag کنید ")))
            .Reorderable(re => re.Columns(true))
            .DataSource(dataSource => dataSource
                .Events(events => events.Error("error_handler"))
                    .Model(model =>
                        model.Id(p =>;
                    .Read(read => read.Action("SeeMarsyeh2", "Marsyehs"))
                .Update("EditByGrid", "Marsyehs")
                .Destroy("DeleteByGrid", "Marsyehs")



    and one of My Drop Down Editor :

    @model marsyeh.Models._Tem
    .DataSource(D => D
        .Read(Read => Read.Action("ForDropDownList", "Tems"))

    And I Used "  [UIHint("Tem2DropDown")]" in model to relating column with Editor and it worked ...


  2. Answer
    Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 07 Aug 2015 Link to this post

    Hello iman,

    In general, the widget's name should point to the model field. That being said, the widget should be named after the specific model field. If the model field is "Event", then the name of the widget should be also "Event". This will ensure that the widget updates the correct model field on change.

    I would suggest you review our "Editing custom editor" demo for more details. If you would like to review the full implementation, please refer to the offline demos part of the UI for ASP.NET MVC bundle. You can find them in the installation folder of the components.

    Georgi Krustev
    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
  3. iman
    iman avatar
    2 posts
    Member since:
    Jul 2015

    Posted 09 Aug 2015 in reply to Georgi Krustev Link to this post

    thanks......Very much  ..!!!
Back to Top