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

.NET Core Grid - Batch with Inline Edit

3 Answers 734 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Veteran
Paul asked on 12 Feb 2021, 10:12 AM

Hi there,

I can see from your Batch editing demo that the grid is configured to use InCell editing mode. However, I am trying this with InLine editing mode:

 

@(Html.Kendo().Grid(Model.MapDetails)
                .Name("MapDetails")
                .Columns(columns =>
                {
                    columns.Bound(p => p.Scale).Title("Scale");
                    columns.Bound(p => p.PageNo).Title("PageNo");
                    columns.Command(command => { command.Edit(); command.Destroy(); });
                })
            .Editable(editable => editable.Mode(GridEditMode.InLine))
            .ToolBar(toolbar =>
            {
                toolbar.Create();
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .Batch(true)
                .PageSize(20)
                .ServerOperation(false)
            )
        )

 

However, when attempting to save the row, the grid is failing as it is attempting to trigger a POST action - it does not appear to be respecting the Batch edit mode.

The reason for I am trying this is that using InCell editing it is letting me complete a row without actually triggering all client side validation. For example, using InCell editing:

  • Click Add New Record
  • New row added, Scale cell selected in first column - client side validation enabled for this
  • I can complete this cell and then Add the row to the datasource - without the validation being triggered for the second cell in the Page No column.

This is not ideal - using Inline editing, whole row goes into edit mode and all client side validation is triggered. Can you advise if this mode is supported with batch editing and if not, is there a suitable workaround you could suggest?

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 17 Feb 2021, 09:46 AM

Hi Paul,

Thank you for the provided snippet and clarifications. 

At present, the batch editing of the grid is available only for the InCell edit mode. This is due to the fact that the Update button for the inline edit will internally call the sync() method. Hence, after every update (even though batch is enabled) it will send only one item to the server.

Is there a specific reason why the InCell edit mode is not suitable in your case? 

I am afraid that we have no immediate plans to enable the batch editing with InLine edit mode out-of-the-box. However, you could log an item in our feedback portal:

https://feedback.telerik.com/kendo-jquery-ui

 

Kind regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Jamie
Top achievements
Rank 1
commented on 01 Mar 2023, 01:12 PM

I have also encountered this design problem, has there been any changes since this reply to allow in-line editing with batch editing?
Alexander
Telerik team
commented on 06 Mar 2023, 07:36 AM

Hi Jamie,

Currently, there have not been any design alterations of combining two edit modes simultaneously. Particularly for the InLine editing, there is a feature request logged for such functionality. For which, I recommend that you cast your vote on:

I understand the importance this has for your currently implemented scenario. Thus, there are customary alternatives that involve the combination of Batch and Popup editing. One of which is discussed in the following thread:

Although the aforementioned forum tackles an ASP.NET MVC scenario, the same approach would be also applicable to the ASP.NET Core framework as well.

And a knowledge base article that illustrates how to integrate a built-in column popup editor by embedding a Window component. Whilst preserving the Batch processing on the server-side.

I hope this information helps during your endeavors. It is important to mention that due to the custom nature of the mentioned above approaches, they do not guarantee any sporadic behavior from not persisting if further modifications are made. Hence, I recommend implementing them with caution.

0
Paul
Top achievements
Rank 1
Veteran
answered on 17 Feb 2021, 09:48 AM

Thanks for the response.

I stated the reason above:

The reason for I am trying this is that using InCell editing it is letting me complete a row without actually triggering all client side validation. For example, using InCell editing:
Click Add New Record
New row added, Scale cell selected in first column - client side validation enabled for this
I can complete this cell and then Add the row to the datasource - without the validation being triggered for the second cell in the Page No column.

 

Basically, it's a confusing user experience. The validators are only triggered for the second column cell if you click on it before clicking add.

 

0
Tsvetomir
Telerik team
answered on 17 Feb 2021, 04:34 PM

Hi Paul,

I apologize for missing out that the main point for not using the InCell edit mode is the validation. It is correct that the validation is done only over the input HTML elements and no over the actual values of the model. 

As a proof of concept, I have prepared a sample where custom validation is executed for the grid whenever the user attempts to submit the changes:

https://dojo.telerik.com/erOpOTuw

Evaluate the example above and let me know if that is applicable in your scenario.

 

Kind regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Veteran
Answers by
Tsvetomir
Telerik team
Paul
Top achievements
Rank 1
Veteran
Share this question
or