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

Add new row at the bottom

4 Answers 908 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Clinton Smyth
Top achievements
Rank 1
Clinton Smyth asked on 05 Apr 2012, 09:40 PM
Hi

I've looked through your demos and whenever there's a 'Add new record' button in the grid, the new blank row appears at the top.

Is there a way to configure the grid to display the blank fields after the last row of the grid?

4 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 10 Apr 2012, 10:02 AM
Hi Clinton,

Out of the box "Add new record" button of the Kendo UI Grid allows you to insert a new item only at the top position. In order to achieve the needed functionality you could use a custom button which calls the addRow() method and move the row with jQuery to the bottom of the Grid. For example: 
<button onclick="insertItem()">Insert new item</button>
...
function insertItem(){
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
    $(".k-grid-edit-row").appendTo("#grid tbody");
}

I hope this helps.

Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ravikant
Top achievements
Rank 1
answered on 20 Apr 2012, 07:00 AM
I want to add  a new row at the bottom of the existing row with same data in kendo-grid on click of a button corresponding to each row

Can you please help me to get out of this
0
Phillip
Top achievements
Rank 1
answered on 30 Apr 2015, 07:02 PM
When I do this and after I click the Update button, the newly added row is back to the top again. How can I keep the newly added row stays at the bottom after clicking the update button.
0
Phillip
Top achievements
Rank 1
answered on 30 Apr 2015, 07:19 PM

I got the answer. just use this.

.Editable(editable => editable.Mode(GridEditMode.InLine).CreateAt(GridInsertRowPosition.Bottom))

Tags
Grid
Asked by
Clinton Smyth
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Ravikant
Top achievements
Rank 1
Phillip
Top achievements
Rank 1
Share this question
or