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
185
Impossible to retrieve object primary key of the selected row without defining a useless column for the primary key
posted

Impossible to retrieve object primary key of the selected row without defining a useless column for the primary key.

Inconsistent behaviors between igGrid and igHierarchicalGrid

Here are the examples:

igGrid: http://codepen.io/anon/pen/aJILd (error in the console : "Cannot read property 'dataType' of null")

igHierarchicalGrid: http://codepen.io/anon/pen/ytdLB (error in the console : "Cannot read property 'id' of null")

Parents
No Data
Reply
  • 5513
    Offline posted

    Hello Francesc,

    Defining the primary key column is currently a requirement in the KO scenario. You could however hide it by adding the "hidden: true" property to the column definition:

    { headerText: 'Product ID', key: 'ProductID', dataType: 'number', hidden: true }

    In this way the grid should look like as though the column has not been defined. If you plan on using the Hiding feature you might need to add a column setting for this column with "allowHiding: false" as to disable users from showing it.

    I hope this helps!

    Best regards,

    Stamen Stoychev

Children