New Entry / Grouping behavior when using a Pop-up Editor

6 posts, 0 answers
  1. Richard
    Richard avatar
    10 posts
    Member since:
    Aug 2013

    Posted 04 Nov 2013 Link to this post

    I have a group-able Kendo grid with a pop-up editor. When the user clicks "New Entry" a new row is created in a new grouping even if the a group already exists for that value. Additionally, if the user clicks "Cancel" the incomplete row and its group is retained. If the user clicks "New Entry" again, the old incomplete entry is removed, but the group is retained.

    How do I tell the Kendo Grid to not create a new row until the user has clicked OK for the new entry (and the entry has passed validation)? Is it possible to have this new row correctly placed in the appropriate grouping?

  2. Alexander Popov
    Alexander Popov avatar
    1436 posts

    Posted 06 Nov 2013 Link to this post

    Hello Richard,

    Creating a new group when adding new item is expected, unless there is a defaultValue for the column which the Grid is grouped by. Here I tried to reproduce the issue, but everything works as expected - both the new row and the new group are removed on Cancel. Could you please check the example and let me know if I am doing something differently? 
    I am afraid that adding the new row only after pressing the OK button is currently not supported out of the box.

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Cristina
    Cristina avatar
    6 posts
    Member since:
    Apr 2016

    Posted 29 Jul 2016 in reply to Alexander Popov Link to this post

    I know this is old, but I am having this same issue now as well.  I am grouping by a foreign key, and even tried adding a default value.  However, it still creates a new group (the new group is using the default value, which is an existing group, also odd...) and when I click cancel on the pop up editor, the new group and new row persist.  Any help or insight would be greatly appreciated!!  I was asked to add this property/foreign key specifically for grouping, so I need to get this right.

    Here is my model:

    public class RV_ReportViewModel
            public int ReportId { get; set; }
            [DisplayName("Report Name")]
            public string ReportName { get; set; }
            [DisplayName("Report Path")]
            public string ReportPath { get; set; }
            public int CategoryId { get; set; }
            public List<RV_ReportGroupsViewModel> Groups { get; set; }

    Here is the code for my grid. 

                      .Columns(columns =>
                          columns.Bound(r => r.ReportName).Groupable(false);
                          columns.Bound(r => r.ReportPath).Groupable(false);
                          columns.ForeignKey(r => r.CategoryId,(System.Collections.IEnumerable)ViewData["categories"],"CategoryId","Name");
                          columns.Command(command =>
                      .ToolBar(toolbar => toolbar.Create())
                      .Editable(editable => editable.Mode(GridEditMode.PopUp))
                      .DataSource(dataSource => dataSource
                          .Model(model =>
                              model.Id(s => s.ReportId);
                              model.Field(s => s.CategoryId).DefaultValue(1);
                          .Create(update => update.Action("Report_Create", "ReportViewer"))
                          .Read(read => read.Action("Report_Read", "ReportViewer"))
                          .Update(update => update.Action("Report_Update", "ReportViewer"))
                          .Destroy(update => update.Action("Report_Destroy", "ReportViewer"))))


  4. Eyup
    Eyup avatar
    3320 posts

    Posted 02 Aug 2016 Link to this post

    Hi Cristina,

    I am sending a sample runnable application which we can use as a reference point. Please modify the BatchSearch View in the attached sample ( run with /Home/BatchSearch ) to replicate the described scenario and send it back to us for further investigation.

    Telerik by Progress
    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
  5. Tom
    Tom avatar
    4 posts
    Member since:
    Jul 2016

    Posted 24 Jul Link to this post

    Hi Eyup,

     I know this is just under 12 months old but I am having the exact same issue as above. I have added the DefaultValue but experience the same behavior. Did you guy's come up with a resolution?

     I can provide more details if required.



  6. Vasil
    Vasil avatar
    1604 posts

    Posted 26 Jul Link to this post

    Hello Tom,

    At the moment there is no workaround that to be universal and to work in all configurations of the grid.

    The new item have only top and bottom position to be placed at. And this is the reason it creates a group to be visible in. It is the desired approach and we do not plan to change it.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top