[CLOSED] RowExpander | Currently Expanded Row

  1. #1

    [CLOSED] RowExpander | Currently Expanded Row

    Hi,How can we get the currently expanded row in a grid which has Row Expander? I cud'nt see any property / method in Row Expander to get it.


    May be something which returns the array of expanded rows will be good.


    Thanks,




  2. #2

    RE: [CLOSED] RowExpander | Currently Expanded Row

    Hi,

    RowExpander plugin has js object 'state' contains ids for records which collapsed or expanded
    var state = grid.getRowExpander().state;
    var expanded = state[recordId];

    Please provide more details if you need additional information
  3. #3

    RE: [CLOSED] RowExpander | Currently Expanded Row

    Yes... State stores recordID. I want rowIndex of expanded row.
  4. #4

    RE: [CLOSED] RowExpander | Currently Expanded Row

    Hi,

    Here is the code which gives expanded records and indexes

       var store = grid.store,
             state = grid.getRowExpander().state,
             expandedRecords = [];
    
       store.each(function(record, index){
             if(state[record.id]){
                   expandedRecords.push({record:record, index:index});
             }
       });
      
       // use here expandedRecords array as required
  5. #5

    RE: [CLOSED] RowExpander | Currently Expanded Row

    Dont you think it will be good to have a Method to execute this function. So something like RowExpander1.getSelectedIndex(); which will return an array fromt he code you gave.
  6. #6

    RE: [CLOSED] RowExpander | Currently Expanded Row

    Hi,

    We have added 'getExpanded' method (return array of selected records and its indexes (array of {record, index}))
    grid.getRowExpander().getExpanded()
  7. #7

    RE: [CLOSED] RowExpander | Currently Expanded Row

    perfect.... Thanks...

Similar Threads

  1. [CLOSED] ComboBox Focus Expanded
    By jeybonnet in forum 1.x Legacy Premium Help
    Replies: 17
    Last Post: Jan 16, 2013, 3:04 PM
  2. [CLOSED] button expanded in IE7
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 29, 2011, 12:46 AM
  3. [CLOSED] RowExpander scroll to top of grid when expanded
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 30, 2011, 1:56 PM
  4. [CLOSED] TreeNode Expanded property
    By ewgoforth in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 07, 2010, 3:29 PM
  5. Combo always expanded
    By walle in forum 1.x Help
    Replies: 4
    Last Post: Nov 29, 2010, 12:46 PM

Posting Permissions