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

Fire event after row has been removed from Grid?

4 Answers 994 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 1
Kyle asked on 05 Jun 2012, 06:53 PM
According to the documentation, the 'remove' event is called before a row is actually removed from a grid. I would however like to know once a row has been removed from the grid. Is this possible?

I have a hidden input that keeps the ids in a hidden input field, so that nothing gets modified until the user hits submit. I would like a way to update the input once the row has been removed (because the remove event fires BEFORE the row has been removed, I cannot trigger based on it).

Any suggestions?

4 Answers, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 31 Aug 2012, 07:50 PM
Did you ever determine a way to do this?

The problem we are trying to solve is after removal of the last row from the grid, we need an event, and it doesn't look like there is one for that. We'd be ok if it fired after every row was removed too, but I can't find it.

Any help, Kendo staff?
0
Alexander Valchev
Telerik team
answered on 05 Sep 2012, 01:54 PM
Hello guys,

You may use the requestEnd event of the dataSource which fires after a create, read, update or destroy request is successfully completed.
var dataSource = new kendo.data.DataSource({
    requestEnd: function(e) {
        // handle event
    }
});

The event argument contains information about the operation type (e.type) and server response (e.response).

Please note that this method is currently available only in the latest internal builds and will be officially released in the next service pack version.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ryan
Top achievements
Rank 1
answered on 04 Oct 2012, 09:08 PM
Howcan I definethis event handler using the  MVC grid wrapper?

Thanks
0
Alexander Valchev
Telerik team
answered on 09 Oct 2012, 11:02 AM
Hello Ryan,

Here is the syntax:
.DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("Products_Read", "Grid"))
        .Events(e => e.RequestEnd("onReqEnd"))
     )

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Kyle
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Alexander Valchev
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or