Results 1 to 4 of 4

Thread: Prevent rowexpander on collpase in Extjs 5.1.2 grid.

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    30
    Answers
    1

    Default Prevent rowexpander on collpase in Extjs 5.1.2 grid.

    Hi All,

    I have a grid in Extjs 5.1.2 and it has "rowexpander" plugin, on expand icon click row is expanding and collapsing on collapse icon click.

    On collapse icon click I want to display one confirmation message If user click "Yes" then collapse else keep expanded.

    But it is not working for me , I am getting the confirmation message box after row getting collapsed.

    Is there any way to prevent the default collapse event and collapse after user confirmation ?

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2014
    Location
    New Jersey
    Posts
    165
    Answers
    11

    Default

    Hard to say without looking at any code but I think what you would want to do is in the RowExpander's collapseBody event, do a return false and that should prevent it from the default collapse.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    30
    Answers
    1

    Default

    Hi Jmin,

    Thanks for the reply.

    I implemented what exactly you said, but the code line "return false" executes after collapsing the rowexpander.

    My assumption was the same it should execute it before collapse.

    Any other suggestion ?

  4. #4
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    Unfortunately, you would need to implement this yourself. Returning false on either of those event handlers does not prevent from firing as there is no logic around those events to check that. This all happens in toggleRow: http://docs.sencha.com/extjs/5.1/5.1...thod-toggleRow
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

Similar Threads

  1. Nested Grid using rowexpander in extjs 4
    By renganathan in forum Ext: Q&A
    Replies: 5
    Last Post: 22 Jan 2014, 9:33 PM
  2. Grid Collpase returns error in Firefox
    By rafaelrp in forum Ext: Q&A
    Replies: 8
    Last Post: 15 Mar 2012, 11:08 AM
  3. Replies: 1
    Last Post: 29 Aug 2011, 3:07 AM

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
  •