Author Topic: Default value is not showing after set editable as false for related column.  (Read 3357 times)

VigneshVpn

  • Newbie
  • *
  • Posts: 33
    • View Profile
Hi,

I set editable as false for a column in colModel then i dynamically added a row with default values including the 'editable:false' columns.

If i removed the editable attribute then it shows the defualt value on that column.

pqGrid Demo I tried to workout is,

https://paramquery.com/demos/editing_custom


add below function inside the startup function of pqGrid demo,

var grid1;


addRow=function(){
   
      var rowDatas = {
        "ShipCountry": "Austria",
        "books": "Asp",
        "fruits": "Apple",
        "OrderID": "12345",
        "OrderDate": "07/08/1996",
        "ShipViaId": 980,
        "ShipVia": "",
      "Freight":"3.05",
      "ShipAddress":"Rua da Panificadora, 12"
    };
      
   var rowIx = grid1.pqGrid("addRow", { rowIndxPage: 0, rowData: rowDatas });

    grid1.pqGrid("goToPage", { rowIndx: rowIx });
    grid1.pqGrid("editFirstCellInRow", { rowIndx: rowIx });
      
}

add html template in the demo html,

<button id="addrow" onclick="addRow()">Add Row</button>

In pqGrid demo also i did not get the values when adding a new row.


Do you have any idea to solve this. if you have plz help me?

Thanks in Advance,
Vignesh.
« Last Edit: November 22, 2018, 06:42:42 pm by VigneshVpn »

VigneshVpn

  • Newbie
  • *
  • Posts: 33
    • View Profile
Any Trick to solve this? anyone?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
pass checkEditable: false to addRow.

https://paramquery.com/api#method-addRow

VigneshVpn

  • Newbie
  • *
  • Posts: 33
    • View Profile
Wow...Thank you admin. it worked....