Results 1 to 9 of 9

Thread: Need EditorGrid to always re-render.

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Posts
    7

    Default Need EditorGrid to always re-render.

    I have a EditorGridPanel with some a ColumnModel with a couple of custom renderers and editors. The editors may return the same value after the user tabs out even if the user has actually selected a different option in a combobox in the editor. I need the renderer to be forced to re-render to reflect the different combobox value, even though the editor returns the same thing after editing for getValue(). Is there any way to do this that isn't too painful?
    Thanks

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Code:
    editorGrid.getView().refresh();
    Aaron Conran
    @aconran

  3. #3
    Sencha User
    Join Date
    Nov 2009
    Posts
    7

    Default

    Will that just refresh the whole grid based on the data in the store? I want to re-render the cell that's being edited based on what's in the editor.

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    extjosh - yes, it's the only public method thats going to do what you want though...

    You need to trigger a change in the record and the grid will update itself.

    You could also invoke the private method refreshRow(record). This will be changing in Ext 4 and is subject to breaking but it should work the entire 3.x branch...

    Code:
    editorGrid.getView().refreshRow(record);
    Aaron Conran
    @aconran

  5. #5
    Sencha User
    Join Date
    Nov 2009
    Posts
    7

    Default

    The record does not contain the info I need to update the grid cell. If the user is editing a cell and convert 32F to 0C by selecting C in the ComboBox, I want it to render as 0C, even though the value in the record does not change.

  6. #6
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    ... Doesn't matter, invoke refreshRow on the gridview and should refresh that specific row
    Aaron Conran
    @aconran

  7. #7
    Sencha User
    Join Date
    Nov 2009
    Posts
    7

    Default

    What exactly 'doesn't matter'? How does it refresh it? It does not appear to help me. Are you saying that the refresh will re-render the editors' values into the grid for that row? When should I call this?

  8. #8
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    It will re-render that particular record and execute its renderers etc.. Call it after the editor completes to repaint the row
    Aaron Conran
    @aconran

  9. #9
    Sencha User
    Join Date
    Nov 2009
    Posts
    7

    Default

    Thank you so much.

Similar Threads

  1. EditorGrid with BufferView does not render on resize
    By omalley in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 26 Oct 2010, 9:50 AM
  2. EditorGrid<DTO> dosent render
    By nmasilva in forum Ext GWT: Help & Discussion (1.x)
    Replies: 2
    Last Post: 26 May 2009, 8:55 AM
  3. Second EditorGrid Render, Editors do not work
    By adbox in forum Ext 2.x: Help & Discussion
    Replies: 22
    Last Post: 12 Mar 2009, 10:25 AM
  4. Tab/Sub-Panel Does not Automatically Render (but does render on resize)
    By paradxum in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 8 Sep 2008, 7:52 AM
  5. Render EditorGrid to Tab
    By Jack_S in forum Ext 2.x: Help & Discussion
    Replies: 20
    Last Post: 8 Sep 2008, 6:47 AM

Posting Permissions

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