Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid.canEdit overriden by ListGrid.startEditingNew

    Hello,

    I noticed that if I define a ListGrid as canEdit:false, then that is overriden by calling ListGrid.startEditingNew. Is that the designed functionality because it seems like a bug?

    I'd like to define a grid where users can enter new rows after clicking ListGrid.startEditingNew but they cannot edit those rows after they are added to the grid. However, since calling startEditingNew() makes all of the rows in a grid editable, I'm having trouble making the ListGrid work the way I want. Any suggestions?

    #2
    This is intended behavior. To prevent the end user from triggering editing, use editEvent:"none". For finer grained control, override ListGrid.canEditCell()

    Comment


      #3
      Thanks, editEvent:"none" works great for me here. It might be helpful to clarify that you can override canEdit:false on the grid for all rows by calling startEditingNew and that will make the grid editable because I could see that confusing others as well.

      Comment


        #4
        SmartClient Version: v9.1p_2014-06-10/PowerEdition Deployment (built 2014-06-10)

        Hello, I've just found very useful this thread.
        Maybe it could be useful inside the docs for ListGrid.canEdit, too :-)

        Comment

        Working...
        X