ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: VigneshVpn on November 22, 2018, 05:15:13 pm

Title: Default value is not showing after set editable as false for related column.
Post by: VigneshVpn on November 22, 2018, 05:15:13 pm
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.
Title: Re: Default value is not showing after set editable as false for related column.
Post by: VigneshVpn on November 26, 2018, 11:32:06 pm
Any Trick to solve this? anyone?
Title: Re: Default value is not showing after set editable as false for related column.
Post by: paramvir on November 26, 2018, 11:44:33 pm
pass checkEditable: false to addRow.

https://paramquery.com/api#method-addRow
Title: Re: Default value is not showing after set editable as false for related column.
Post by: VigneshVpn on November 27, 2018, 10:49:49 am
Wow...Thank you admin. it worked....