Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    help with sectionStack...

    Hi, I have this sectionStack as below. I want to get to the TreeGrid declared in 4th section , how do I do that.. ( don't want to use ID's )

    see line 5 below. tried (this.getSections())[3].getItems[0] and does getSections return list of the objects?
    Code:
    isc.SectionStack.create({
      visibilityMode: "multiple",
      /* Sections  3: TreeGrid */
     localFetchData: function() {
     	var localAlertGrid = (this.getSections())[3].getItems[0];
      	localAlertGrid.fetchData(null, function() {
    		   localAlertGrid.getData().openAll();
    	});
      },
      
      sections: [
        {
          canCollapse: false,
          showHeader: false,
    	  hidden:  false,
          expanded: true,
          resizeable: false,                
          items: [  // Some items ]
        },
    	{
          canCollapse: false,
          showHeader: false,
    	  hidden: false,
          expanded: true,
          resizeable: false,                
          items: [   isc.DynamicForm.create({
    			 // .... 
           	})
    	 ]
        },
    	{
          canCollapse: false,
          showHeader: false,
          expanded: true,
          resizeable: false,
    	  hidden: true,                
          items: [   isc.DynamicForm.create({
    				 // .... 
    		})       
    	 ]
        },   
        { 
          canCollapse: false,
          showHeader: false,
          resizeable: true,
          expanded: true,
          hidden: false,
          canHide: false,
         
           items: [
             isc.TreeGrid.create({
               editEvent: "none",
               editByCell: false,
               canEdit: false,
               autoSaveEdits: true,
               editOnFocus: true,
               selectOnEdit: false,
               fixedRecordHeights: false,
               wrapCells: true,
    			  autoFetchData:false, 
    			  dataSource: someDS,
    			  loadDataOnDemand: false,
           			  headerHeight:30, 
    			  cellHeight:25,		
    			  openerImage: null,
    			//  nodeIcon: "../images/user_16.png",  
    			//  folderIcon: "../images/wksp_gp_16.png",
    			  openIconSuffix: "",
    			  closedIconSuffix: "",
    			  alternateRecordStyles: true, 
    			  selectionType: "none",
    			
    			  showSortArrow: "none", 
    			  leaveScrollbarGap: false,   
    
    			  height: "100%",
    			//  customIconProperty: "alertCustomIcon",
    			  checkboxCount: 0, 
    
    			  fields: [
    			  	 // somefield... 
    			   
    			  ]  
    			})
    
      ] 
      } 
      ]            
    });
    Thankyou
    Last edited by Isomorphic; 28 Nov 2007, 10:31.

    #2
    The items are available directly on the sectionHeader returned by getSectionHeader() - so you should be able to achieve this via this.getSectionHeader(3).items[0].

    Another option would be to hold onto a separate pointer to the treeGrid when you create it - for example

    Code:
    var treeGrid = isc.TreeGrid.create(...)
    
    // having got the pointer you can store it wherever you like
    // One option would be to hang it as a direct property on the SectionStack
    
    isc.SectionStack.create(
       // pointer to the treeGrid
       treeGrid:treeGrid,
    
       ... // various properties
    
       sections:[
         ...
         // actually render the treeGrid in the section
         { items:[treeGrid] }
       ]
    });
    Last edited by Isomorphic; 28 Nov 2007, 11:10.

    Comment

    Working...
    X