Author Topic: getHtDetail throw -150  (Read 514 times)

cosconit

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 11
    • View Profile
getHtDetail throw -150
« on: June 29, 2020, 01:38:36 pm »
 An error was thrown when I used the detailmodel
 There is no problem opening the current page and clicking details. But when I switch to another page, and then switch back, there will be an error whit throw -150 , the code is as follows

var option = {
        width: '100%',
       height:$(window).height()-190,
        dataModel: dataModel,
        pageModel: pageModel,
        sortModel: sortModel,
        colModel: colModel,
        trackModel: {on: true},
        fillHandle: "",
        scrollModel: { autoFit: false },
        autoRowHead: false,
        showTop: false,
        wrap: false,
        freezeCols: 4,
        flexHeight: false,
        numberCell: { show: false },
        virtualX: false,
        virtualY: false,
        searchFormId: "#searchForm",
        selectionModel: {type: 'cell', toggle: true, mode: "range"},
        sorter: [ { dataIndx: 'recUpdDt', dir: "down" }],
        detailModel: {
           collapseIcon: "ui-icon-plus",
           expandIcon: "ui-icon-minus",
           //height: 200,
           init: function (ui) {
            var rowData = ui.rowData;
               var rowIndx = rowData.pq_ri;
               var detailobj = gridDetailModel( $(this).pqGrid('instance'), rowData.dipProductPriceLimDtls, rowIndx); //get a copy of gridDetailModel                       
               var $grid = $("<div></div>").pqGrid( detailobj );//init the detail grid.
               return $grid;
           }
      },
      cellClick: function (event, ui) {
         currPriceTableRowData = JSON.parse(JSON.stringify(ui.rowData))
        },
      editorEnd:priceTableEditorEnd
    };

function gridDetailModel( gridMain, rowData, parentRowIndex){
   return {
        colModel: [
             ***
       ],
       width: '80%',
        height: 190,
        freezeCols: 2,
        autoRowHead: false,
       scrollModel: { autoFit: true },
        numberCell: { show: false },
        trackModel: {on: true},
        selectionModel: {type: 'cell', toggle: true, mode: "single"},
        dataModel: {data: rowData, recIndx: "dipProductPriceLimDtlUuid"},
        virtualX: false,
       virtualY: true
      
    };
}

What should I do to solve this problem,thinks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5032
    • View Profile
Re: getHtDetail throw -150
« Reply #1 on: June 29, 2020, 10:57:44 pm »
Which version of grid are you using?

I don't see the error in the row detail demo: https://paramquery.com/pro/demos/detail

Can you please share a jsfiddle so that I can check it.