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

Additional Command in the Pageable Bar

4 Answers 172 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mgs
Top achievements
Rank 1
mgs asked on 01 Mar 2013, 08:03 AM
I want my grid to have a "create command". I do know that I can achieve it with the toolbar. However, having a toolbar means having an extra row at the top.

I prefered if I could add a command to the bottom Pageable Bar. A "create command" would fit nicely right to the "refresh command".

Is this possible?

Michael G. Schneider

4 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 04 Mar 2013, 03:12 PM
Hi Michael,

 
Adding such create command is not supported out of the box, however you can use jQuery to add such button on document ready event:

Add the button next to the refresh button (after the grid is loaded):

$("#grid .k-pager-refresh").before("<a href='javascript: void(0)' onclick='addRecord()' class='pagerAddRecord'>Add</a>");

addRecord function:
function addRecord()
{
    var grid = $(event.srcElement).closest(".k-grid").data("kendoGrid");
    grid.addRow();
}

example CSS styles:
.pagerAddRecord {
    float: right;
    margin-right: 6px;
    padding: 3px;
    width: 16px;
    height: 16px;
}

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mgs
Top achievements
Rank 1
answered on 04 Mar 2013, 03:40 PM
Hello Vladimir,

thanks a lot. It works perfectly.

Maybe you can think about integrating "adding buttons to the pageable bar" into Kendo. I do not like the toolbar, as it means wasted vertical space, if there are only one or two commands.

Michael G. Schneider
0
Vladimir Iliev
Telerik team
answered on 04 Mar 2013, 03:54 PM
Hi Michael,

 
I would suggest to share your idea at Kendo UserVoice to allow other users vote for it. Most voted ideas are included in next KendoUI releases.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mgs
Top achievements
Rank 1
answered on 04 Mar 2013, 05:39 PM
Hello Vladimir,

ok, I have done so. It is here.

Michael G. Schneider
Tags
Grid
Asked by
mgs
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
mgs
Top achievements
Rank 1
Share this question
or