Am I editing first row?

2 posts, 1 answers
  1. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 29 Feb 2016 Link to this post

    I'm doing some inline editing in the grid. If I'm in the first row, the first columns must have a static text instead of a dropdownlist.

    How can I determine if I'm in that first row and then make that cell static text or dropdownlist? I've got the dropdownlist working fine, I just need to swap out the template based on which row it is.

  2. Answer
    Alexander Popov
    Alexander Popov avatar
    1445 posts

    Posted 02 Mar 2016 Link to this post

    Hi Ed,

    Try subscribing to the Grid's edit event. Once it is triggered, you can get the the index the row and determine whether to replace the DropDownList with a static text. For example: 
    function onEdit(e) {
        if(e.container.index() == 0) {

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