[CLOSED] Disable Editor grid row

  1. #1

    [CLOSED] Disable Editor grid row

    I have a grid similar to:
    http://mvc.ext.net/#/GridPanel_ComponentColumn/Editor/

    How can I disable editting of a row based on a value in the store? It would also need to be greyed out.

    I've seen other solutions on the forum which included hiding the row (this row needs to remain visible) or disabling selection (which doesn't work since users are not selecting the row, they are changing cell values) or the edit is canceled (which does not work here since the edit boxes are already showing).

    Thanks,
    Amit
    Last edited by Daniil; Aug 23, 2013 at 3:45 AM. Reason: [CLOSED]
  2. #2
    Hello!

    You should use BeforeBind event:

    Html.X().ComponentColumn()
        .Editor(true)
        .DataIndex("IntField")
        .Flex(1)
        .Text("Integer")
        .Component(Html.X().NumberField())
        .Listeners(l => l.BeforeBind.Handler = "if (e.record.get('IntField')%2) e.config[0].disabled = true")
  3. #3
    Will

    e.config[0].disabled = true
    Disable the entire row or do I need to do this for each column?
  4. #4
    It applies on a current ComponentColumn only, which a BeforeBind listener is defined to.

Similar Threads

  1. Replies: 3
    Last Post: Sep 29, 2014, 3:43 PM
  2. Replies: 6
    Last Post: Jun 21, 2013, 3:59 PM
  3. [CLOSED] How to disable component column editor
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 19, 2013, 7:16 PM
  4. Grid - Disable Editor Based upon value
    By Tbaseflug in forum 1.x Help
    Replies: 4
    Last Post: Sep 25, 2009, 9:53 AM
  5. Replies: 2
    Last Post: May 04, 2009, 4:52 AM

Tags for this Thread

Posting Permissions