Put multiple rows of a gridview into edit mode

后端 未结 3 1557
醉梦人生
醉梦人生 2020-12-17 05:25

I have the need to allow a user to \"tab through\" making edits on a gridview. There will be one editable column in the row data. The user should be able to hit tab and go

3条回答
  •  时光说笑
    2020-12-17 05:59

    I did a workaround by creating a property in the page:

    protected bool IsEditMode
    {
      get { return this.EditMode; }
      set { this.EditMode = value; }
    }
    

    Then in the GridView I have the controls for view and edit mode inside an item template. Setting the visibility based on the property value:

    
    
        
        
    
    

    This works for editing the whole gridview. You'll probably need to make a few modifications to make it work for individual rows.

提交回复
热议问题