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

Remove Row with Javascript and Aggregates/Groups not refresh

4 Answers 365 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 09 Jun 2017, 11:13 AM

Hello,

If I use the following code to remove a row in the grid and the grid has Aggregates/Groups this Aggregates and groups are not refreshed...
(without Aggregates/Groups it works) see attached picture...

 

4 Answers, 1 is accepted

Sort by
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 09 Jun 2017, 11:17 AM

here is the code for removing the row:

var grid = $(gridname).data("kendoGrid");
var dataitem = grid.dataItem(grid.select());
 
// Datensatz entfernen
grid.dataSource.remove(dataitem);
grid.dataSource.sync();
0
Preslav
Telerik team
answered on 13 Jun 2017, 01:07 PM
Hello Robert,

I was not able to replicate the problem on my side.

That said, could you please share a sample project that replicates the problem. If this is not doable, you could also prepare and share a Dojo.

I look forward to your reply.


Regards,
Preslav
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.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 14 Jun 2017, 11:01 AM

here you can download a sample Project: www.madrian.at/ajax-editing.zip

and here the Video: https://www.screencast.com/t/oYGWYfXMPp

robert

0
Preslav
Telerik team
answered on 15 Jun 2017, 03:51 PM
Hi Robert,

Thank you for providing the project and the video. I was able to reproduce the problem.

To overcome this behavior, I would suggest handling the requestEnd of the dataSource and invoking the read method:
For example:
.DataSource(dataSource => dataSource
...
.Events(events => events..RequestEnd("onRequestEnd"))
...
)
<script type="text/javascript">
    function onRequestEnd(e) {
        if (e.type == "destroy") {
            e.sender.read();
        }
    }
</script>


Regards,
Preslav
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.
Tags
Grid
Asked by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Preslav
Telerik team
Share this question
or