Announcement

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

    Listgrid error

    I keep getting errors for the canvases below and cannot figure out what it is I'm doing wrong.

    The error is:

    11:26:59.177:MUP8:WARN:Log:TypeError: _9.indexOf is not a function
    [c]Canvas.applyStretchResizePolicy(_1=>[object Array], _2=>541, _3=>1, _4=>true, _5=>{Obj})
    Layout._getMemberSizes(541, true, [object Array], [object Array])

    Code:
    
    isc.VLayout.create({ID:"tableTest",name:"table",title:" ",showResizeBar:false,height:"100%",width:"100%",
    members:
        [isc.DataSource.create(
            {ID:"CellHeightResultTable$ds",
            fields:[
                {name:"String_1"},
                {name:"Int_1"},
                {name:"cwDocId"},
                {name:"Boolean_1"},
                {name:"cwPK__",primaryKey:true}
            ],
            showPrompt:false}
        ),
        isc.ListGrid.create({
            dataSource:"CellHeightResultTable$ds",
            fastCellUpdates:false,
            groupStartOpen:"all",
            ID:"CellHeightResultTable",
            modalEditing:true,
            recordBaseStyleProperty:"velocityRowStyle",
            canSelectText:true,
            selectOnEdit:true,
            autoFetchData:false,
            canSort:true,
            headerButtonProperties:{wrap:true},
            width:"100%",
            height:"100%",
            cellHeight:50,
            fields:[
                {title:"<nobr>String&nbsp;<\/nobr>"},
                {title:"<nobr>Int&nbsp;<\/nobr>",type:"decimal",name:"Int_1",align:"left",validateOnChange:true,width:100},
                {title:"<nobr>System document ID&nbsp;<\/nobr>",name:"cwDocId",align:"left",canEdit: false,validateOnChange: true, width:100},
                {title:"<nobr>Boolean&nbsp;<\/nobr>",type:"boolean",canToggle:false,name:"Boolean_1",align:"left",validateOnChange: true,width:100},
                {type:"image",title:"<nobr>&nbsp;&nbsp;<\/nobr>",width:15,imageWidth:10,imageHeight:10,name:"_cwShowDetailColumn",align:"left",canEdit:false,validateOnChange:true}
            ]
            })
        ]
    });

    #2
    You seem to have a DataSource in the members array? A DataSource is not a Canvas.

    Comment


      #3
      I see - weird though that it works with brackets around it

      Code:
      
      isc.VLayout.create({ID:"tableTest",name:"table",title:"&nbsp;",showResizeBar:false,height:"100%",width:"100%",
      members:
          [(isc.DataSource.create(
              {ID:"CellHeightResultTable$ds",
              fields:[
                  {name:"String_1"},
                  {name:"Int_1"},
                  {name:"cwDocId"},
                  {name:"Boolean_1"},
                  {name:"cwPK__",primaryKey:true}
              ],
              showPrompt:false}
          ),
          isc.ListGrid.create({
              dataSource:"CellHeightResultTable$ds",
              fastCellUpdates:false,
              groupStartOpen:"all",
              ID:"CellHeightResultTable",
              modalEditing:true,
              recordBaseStyleProperty:"velocityRowStyle",
              canSelectText:true,
              selectOnEdit:true,
              autoFetchData:false,
              canSort:true,
              headerButtonProperties:{wrap:true},
              width:"100%",
              height:"100%",
              cellHeight:50,
              fields:[
                  {title:"<nobr>String&nbsp;<\/nobr>"},
                  {title:"<nobr>Int&nbsp;<\/nobr>",type:"decimal",name:"Int_1",align:"left",validateOnChange:true,width:100},
                  {title:"<nobr>System document ID&nbsp;<\/nobr>",name:"cwDocId",align:"left",canEdit: false,validateOnChange: true, width:100},
                  {title:"<nobr>Boolean&nbsp;<\/nobr>",type:"boolean",canToggle:false,name:"Boolean_1",align:"left",validateOnChange: true,width:100},
                  {type:"image",title:"<nobr>&nbsp;&nbsp;<\/nobr>",width:15,imageWidth:10,imageHeight:10,name:"_cwShowDetailColumn",align:"left",canEdit:false,validateOnChange:true}
              ]
              }))
          ]
      });

      Comment


        #4
        That leaves a null in the members array, also incorrect but that case is caught and warned about.

        Comment


          #5
          Oh ok. Thanks

          Comment

          Working...
          X