jQWidgets Forums

jQuery UI Widgets Forums Grid conditionally editable cell for row edit

This topic contains 2 replies, has 2 voices, and was last updated by  jessiema 8 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • conditionally editable cell for row edit #89502

    jessiema
    Participant

    I have search the forum regarding this issue as discussed here (and a few other posts)

    http://www.jqwidgets.com/community/topic/conditionally-editable-rules-for-grid-cell/

    However, seems all of them are for cell edit mode. When I use editMode:’selectedRow’, using the cellbeginedit callback doesn’t work. I debugged inside the source code and the cellbeginedit is called properly. But as long as there is one cell in the row is editable, the whole row go ahead and call grid’s _rendervisualrows and _rendervisualcell and _showcelleditor after that.

    Is there a way to achieve my use case with the row edit mode?

    Thanks a lot!

    conditionally editable cell for row edit #89515

    Christopher
    Participant

    Hi jessiema,

    It’s normal for the cellbeginedit callback to return data only about the cell that has been clicked. Try using the `cellbeginedit’ event. It returns the full data from the selected row, not just the clicked cell.

    Best Regards,
    Christopher

    jQWidgets Team
    http://www.jqwidgets.com

    conditionally editable cell for row edit #89539

    jessiema
    Participant

    Hi Christopher,

    Thanks for your quick reply. Our company has been using jqwidgets for a while and is pretty happy with it:)

    Regarding my question – here is a fiddle. I understand the use of cellbeginedit. If comment out editmode in my fiddle to use the default cell edit, everything works. But when using editmode:’selectedrow’, the whole row is editable as long as one cellbeginedit return true. You can turn on my alert in getEditable function to verify it. Basically, I want firstname to be editable only when quantity is great than 10…

    http://jsfiddle.net/mengma/vd65a48c/1/

    Thanks!

    Jessie

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.