How to refresh non-editable fields after inline edit.

2 posts, 0 answers
  1. Gerald
    Gerald avatar
    1 posts
    Member since:
    Mar 2016

    Posted 14 Apr 2016 Link to this post

    I have a Gird which has a number of editable fields as well as some standardized auditing fields (LastUpdatedBy, LastUpdatedOn).


    The later are intended to be read only.  So they are marked as Editable(false)

                model.Field(a => a.LastModifiedBy).Editable(false);
                model.Field(a => a.LastModifiedOn).Editable(false);

    For the inline edit I am doing an Ajax call to controller action which processes the edit, updates the modified fields and passes the updated record back to the grid.  The grid displays the editable changes however I assume because they are non-editable the modified fields are not updated.  Doing a refresh of the page displays correct information but that is not desirable.

    How can the behavior of Grid be override so that it will update the display of all model fields even the ones marked non-editable after an update?



  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 18 Apr 2016 Link to this post

    Hello Gerald,

    My suggestion in this case is to avoid setting Editable(false); for both fields, because this does not allow modifying of the records at all. 

    Instead you can use the edit event of the Kendo UI Grid and make both input elements read-only. This can be achieved by using e.container element and find the input elements using jQuery. 

    Boyan Dimitrov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top