Results 1 to 4 of 4

Thread: Action column icon change issue

  1. #1
    Sencha User
    Join Date
    Jan 2015
    Location
    Pune, India
    Posts
    17

    Default Action column icon change issue

    Hello experts,
    I have 2 grid say A and B, I need to change action columns icon of grid A onbutton click grid b,
    I am using code like,


    var button = Ext.query('td.x-action-col-cell img', myGrid.getView().getNode(index))[4]

    I got myGrid and index correctly, but when alert (button.src)
    I am always getting the icon source of zeroth(0th) row, I haveto get the source with respective to index I have provided.

    Please help.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Sometimes it makes it easier for others to contribute to a solution if you post the partially working code to allow folks to tinker.
    https://fiddle.sencha.com/#home

  3. #3
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    Sorry I do not understand you exactly but...
    ...but to change the icon of the action column, you can use getClass(http://docs-origin.sencha.com/extjs/...n-cfg-getClass) property of the action column.
    So, add apropriate field to the second grid's store, which will be responsible for the icon class and in the button handler change apropriate record of the second grid's store.

    This code is too indian.
    Code:
    var button = Ext.query('td.x-action-col-cell img', myGrid.getView().getNode(index))[4]
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  4. #4
    Sencha User
    Join Date
    Jan 2015
    Location
    Pune, India
    Posts
    17

    Default

    Quote Originally Posted by yeghikyan View Post
    Sorry I do not understand you exactly but...
    ...but to change the icon of the action column, you can use getClass(http://docs-origin.sencha.com/extjs/...n-cfg-getClass) property of the action column.
    So, add apropriate field to the second grid's store, which will be responsible for the icon class and in the button handler change apropriate record of the second grid's store.

    This code is too indian.
    Code:
    var button = Ext.query('td.x-action-col-cell img', myGrid.getView().getNode(index))[4]
    Thank you to judge my coding style sir, I have implemented the geClss method, but the way I was trying is also present in the docs.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •