Row Action Javascript Snippet

edited September 3, 2019 in Questions

Comments

  • edited September 3, 2019
    Is there a question, Shaun?
  • edited February 15, 2018
    Mike

    The question is how do I create a row action snippet that turns table fields on the row in focus to edit mode.

    Regards
    Glen McGoldrick

  • edited September 3, 2019
    Just curious why you wouldn't just use the built-in row action.
    image

    Otherwise, you attach a renderer to a column in the table:
    image

    In the javascript, you want these statements:

    var field = arguments[0];
    var value = arguments[1];
    var renderer = skuid.ui.fieldRenderers[field.metadata.displaytype].edit( field, value );

    Instead of the edit mode, you can use read. Or, for a dynamic setting, use [field.mode].


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!