[CLOSED] [1.0] Reason for continuously switching the Editor reference for a GridPanel field

  1. #1

    [CLOSED] [1.0] Reason for continuously switching the Editor reference for a GridPanel field

    I have seen this atleast 5-6 times in the last couple of months, and am really surprised by this repeated switch.

    Originally, the editor control for a GridPanel column was available as:


    grid.colModel.columns[2].editor.field


    Then, it was modified to:


    grid.colModel.columns[2].editor


    And now, it almost keeps hopping between the 2 above on every update from the SVN. Is there any particular reason for switching the reference for the column editor between the 2 above repeatedly??

  2. #2

    RE: [CLOSED] [1.0] Reason for continuously switching the Editor reference for a GridPanel field

    Hi,

    'editor' is private variable and should not be used directly. Use


    grid.getColumnModel().getColumnAt(2).getCellEditor().field

    getCellEditor( <code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">Number rowIndex</code> ) : Ext.Editor<div class="mdesc" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; color: rgb(68, 68, 68); "><div class="long" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: block; line-height: 18px; ">Returns the editor defined for this column that was created to wrap the Field used to edit the cell.<div class="mdetail-params" style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 12px; font-size: 12px; "><strong style="font-style: normal; font-weight: bold; display: block; margin-bottom: 3px; font-size: 11px; color: rgb(85, 85, 85); ">Parameters:[/b]<ul style="margin-top: 12px; margin-right: 12px; margin-bottom: 12px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: circle; list-style-position: inside; list-style-image: initial; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-position: inside; list-style-type: circle; list-style-image: initial; "><code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">rowIndex</code> : Number<div class="sub-desc" style="margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 16px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">The row index[/list]<strong style="font-style: normal; font-weight: bold; display: block; margin-bottom: 3px; font-size: 11px; color: rgb(85, 85, 85); ">Returns:[/b]<ul style="margin-top: 12px; margin-right: 12px; margin-bottom: 12px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: circle; list-style-position: inside; list-style-image: initial; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-position: inside; list-style-type: circle; list-style-image: initial; "><code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">Ext.Editor</code>[/list]



  3. #3

    RE: [CLOSED] [1.0] Reason for continuously switching the Editor reference for a GridPanel field

    Hi vlad, although I understand that editor is a 'private' variable, but still, I thought there should be some logic switching it that often.

    Anyways, what I could not understand was the rowIndex parameter for the getCellEditor() method. Every column gets a single editor that is used for all rows. What's the use of putting in a rowIndex parameter then??
  4. #4

    RE: [CLOSED] [1.0] Reason for continuously switching the Editor reference for a GridPanel field

    Hi,

    At this moment the 'rowIndex' is not used and can be omitted


    I think it was added on future or if you want to create own grid with multieditor support (it is easy to add support of several editors inside one column, for example show particular editor depends from the record)
  5. #5

    RE: [CLOSED] [1.0] Reason for continuously switching the Editor reference for a GridPanel field

    Thanks for clearing that up vlad!!

Similar Threads

  1. Replies: 4
    Last Post: Dec 14, 2012, 10:49 AM
  2. Replies: 1
    Last Post: Nov 15, 2011, 5:56 AM
  3. GridPanel Editor field help
    By venu.sn2009 in forum 1.x Help
    Replies: 2
    Last Post: Jul 14, 2011, 8:20 AM
  4. [CLOSED] GridPanel Editor field mapping problem
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 01, 2011, 7:42 AM
  5. Replies: 0
    Last Post: Jun 08, 2009, 10:51 AM

Posting Permissions