Announcement

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

    getViewState() throwing error

    Greetings,

    I'm using a treeGrid and trying to save the state. Unless I'm missing something, I should be able to simply say:

    var temp = BasicsTreeGrid.getViewState();

    But any call to .getViewState() throws the error 'this.header.members is null or not an object in ISC_Grids.js

    Am I doing something wrong?

    Thanks,
    S

    #2
    This is the code for the treegrid:

    Code:
    isc.TreeGrid.create({
    	indentSize:2,
    	showConnectors:false,
    	animateFolders:false,
    	cellPadding:0,
        iconSize:1,
        nodeIcon:"[SKIN]transparent_spacer.gif",
        dataSource:GlobalNavDataSource,
        leaveScrollbarGap:false,
        showHeader:false,
        showOpenIcons:false,
        showClosedIcons:false,
        loadingDataMessage:"Loading menu...",
        loadDataOnDemand:false,
        showHeaderContextMenu:false,
        autoFitData:"vertical",
        autoFitMaxRecords:1000,
        autoFitMaxHeight:1000,
        ID:"BasicsTreeGrid",
        width:panelWidth,
        height:"100%",
        autoFetchData:true,
        initialCriteria: {panel: 1},
        autoDraw:false,
        cellClick: function (record, rowNum, colNum) {
             eval(record.target_page_href);
        }
    })

    Comment


      #3
      Okay I've determined the problem. getViewState() won't work if the treegrid property showHeader is set to false. This is a problem, as I do not want a header in the tree grid, it's a menu. Is there a workaround for this?

      Thanks,
      S

      Comment


        #4
        What version are you using?

        Comment


          #5
          The version is 7.0RC2

          Comment


            #6
            This issue appears to be fixed in the latest 8.0 beta and nightlies. See http://forums.smartclient.com/showthread.php?p=41564 for information on a patch that should work on 7.0 as well:

            Comment


              #7
              I'll give it a try.

              Thanks!
              S

              Comment


                #8
                Yep, that worked. Thanks!

                Comment

                Working...
                X