Results 1 to 6 of 6

Thread: gridpanel grouping expand first grouping

  1. #1
    Sencha User
    Join Date
    Jul 2017
    Posts
    8

    Default gridpanel grouping expand first grouping

    How would you make it so that when you load a gridpanel that has the grouping feature turned on, the first grouping is expanded and all the others are collapsed? I have found a way to have it so all are expanded or collapsed by default however not what I described. The attached file is what I want to load on default. Right now it loads with all collapsed.

  2. #2
    Sencha User
    Join Date
    Jul 2017
    Posts
    8

    Default

    It's not allowing me to post my code in here for some reason. It keeps throwing this error: "
    1. Post denied. New posts are limited by number of URLs it may contain and checked if it doesn't contain forbidden words."

    sorry new to forums here.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

    Default

    Add a store load listener. expand the first group on load.

  4. #4
    Sencha User
    Join Date
    Jul 2017
    Posts
    8

    Default

    Any chance you can provide code detailing this?

    How do you actually expand the first group on load when there are no configs for first group. There is only collapse all or none.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

    Default

    https://fiddle.sencha.com/#view/editor&fiddle/294s

    Here, the store is synchronously loaded, so it's done on a render listener.

    If the store reads asynchronously, from a server, then that operation will be in a load listener.

    In a real app, the handler will be in a ViewController for the view.

  6. #6
    Sencha User
    Join Date
    Jul 2017
    Posts
    8

    Default

    hanks for the response with the code. That did solve my problem. I actually had to put my code in the store as a load function and not in the controller.

    Thanks so much!

Similar Threads

  1. Replies: 0
    Last Post: 7 Sep 2017, 3:16 AM
  2. [FIXED] [4.1 RC3] Grouping expand() not working
    By slemmon in forum Ext:Bugs
    Replies: 8
    Last Post: 3 Feb 2013, 4:38 PM
  3. Replies: 5
    Last Post: 29 Oct 2012, 2:09 AM
  4. Replies: 1
    Last Post: 8 Apr 2011, 6:56 AM
  5. Grouping grid expand/collapse help
    By sattysri in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 19 Jun 2008, 3:48 PM

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
  •