Results 1 to 4 of 4

Thread: How to get the current columns in the grid ?

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    180
    Answers
    4
    Vote Rating
    4
      0  

    Default Answered: How to get the current columns in the grid ?

    Hi all,

    In grid , we can show / hide any columns . How to get the current showing columns in the script?


    Is there any way to get the currently showing columns?


    Please help me to get the current columns.

    Please refer the following image ....


    forum.jpg
    Attached Images Attached Images
    Thanks,

    RENGANATHAN M G

  2. Use can use Ext.ComponentQuery to return an array of Column objects that have hidden set to true:

    Code:
    var arrayOfHiddenColumnObjects = Ext.ComponentQuery.query('yourgridwidgetname gridcolumn[hidden="true"]');

  3. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
      0  

    Default

    Use can use Ext.ComponentQuery to return an array of Column objects that have hidden set to true:

    Code:
    var arrayOfHiddenColumnObjects = Ext.ComponentQuery.query('yourgridwidgetname gridcolumn[hidden="true"]');

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Location
    New york, NY
    Posts
    16
    Answers
    1
    Vote Rating
    0
      0  

    Default

    To get the visible columns you have to use getVisibleGridColumns() method from Ext.grid.header.Container.

    Code:
    var visibleColumns = gridObj.headerCt.getVisibleGridColumns();
    alert(visibleColumns[0].text);

  5. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    180
    Answers
    4
    Vote Rating
    4
      0  

    Default

    Thanks for your reply. its working fine
    Thanks,

    RENGANATHAN M G

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
  •