Grid: Insert and Delete only, no update of existing records

4 posts, 0 answers
  1. Daniel Grünberger
    Daniel Grünberger avatar
    46 posts
    Member since:
    May 2008

    Posted 08 Feb 2013 Link to this post


    I'm using the Kendo Grid in my application.

    In my Grid I just need to insert rows and delete them. Update should not be possible.

    If I define the Grid as follows, I dont have an update button to save the values. If I specify the Update function, I get the Update Button.

    How can I achieve this?


        col =>
            col.Command(c => { c.Destroy(); }).Width(250);
        .ToolBar(c => c.Create())
  2. Rosen
    Rosen avatar
    3214 posts

    Posted 12 Feb 2013 Link to this post

    Hi David,

    Although, the requested functionality is not supported you can achieve this using few lines a JavaScript to manually hide the edit command button. This can be implemented by attaching to grid's DataBound event:

       .Columns(columns =>
           columns.Command(command => { command.Edit(); command.Destroy(); });
       .ToolBar(toolbar => toolbar.Create())
       .Editable(editable => editable.Mode(GridEditMode.InLine))
       .Events(events => events.DataBound("dataBound"))
       .DataSource(dataSource => dataSource

    <script type="text/javascript">
        function dataBound() {

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
  4. habeeb
    habeeb avatar
    8 posts
    Member since:
    Apr 2016

    Posted 06 May in reply to Rosen Link to this post

    Has anything changed since ? This does not seem to work. I don't want any edit functionality. Just want insert.


    Also, if I do below, it is adding a new empty colomn in table. Is this a bug ?

    columns.Command(command => { command.Edit(); command.Destroy(); });

  5. Rosen
    Rosen avatar
    3214 posts

    Posted 10 May Link to this post

    Hello habeeb,

    The mentioned approach is still applicable. If you are getting empty command column, then I guess it is working at your end as it is hiding the command buttons. 

    Note that the command buttons column is required when using inline editing, even when only insert operation is used as it is holding the update/cancel button shown during editing. If you want to not have the command column at all you should consider using Popup editing instead. Another approach will be to use a external button and use the Grid's API to submit the record.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET AJAX banner