Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
565
igGrid - Update unbound column
posted

Hi,

Could you please tell how to update an unbound column ? I've seen that with the 2016.1 version, there is method called 'setUnboundValueByPK' but i'm on the 2015.1 version and there is no indication in the documentation for that method. I guess its because its not available.

What could be your workaround for that ? 

Regards


 

Parents
No Data
Reply
  • 7375
    Offline posted

    Hello Steeve,

    To update unbound column, you have to use formula.
    Code Snippet:

    columns: [
    {
         headerText: "Total Price", key: "Total", dataType: "number", unbound: true, format: "currency", formula: function CalculateTotal(data, grid)
    { return data["UnitPrice"] * data["UnitsInStock"]; }
     }
    ]

    You can refer the following sample demonstrates how to add and configure unbound columns in igGrid

    http://www.igniteui.com/grid/unbound-column

    We do have setUnboundValues method in 15.1.  setUnboundValues property sets unbound values for the unbound column with the specified key

    http://www.igniteui.com/help/iggrid-unboundcolumns-method-reference

    Please note setUnboundValueByPK property is not available in 15.1 but available in 15.2. All the method references available for unbound column iggrid is :

    http://www.igniteui.com/help/api/2015.1/ui.iggrid#methods:setUnboundValues

    Please let me know if I can assist you further.

Children