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
115
multiple object mapper
posted

Hello!

The new igGrid object mapper in version 2016.1 is a nice feature.

But i'm a little bit disappointed, that the MVC wrapper doesn't support it. Are there any plans to add this feature?

In the meantime i started to instantiate my grids in JavaScript. I set one column to object and defined a mapper function. Worked well.

After that i wanted to define a second object column. to get a second property from the same object. This doesn't worked for me, because i had to set as key the same property name of the object. Result was two identical columns, because the grid used only the last one.

You can reproduce this if you just add a line in your sample project, page "handling-complex-objects.html".

column definition example:

{ headerText: "Category", key: "Category", dataType: "object", mapper: function (record) { return record.Category.Name; } },
{ headerText: "CategoryId", key: "Category", dataType: "object", mapper: function(record) { return record.Category.ID; } } 

Parents
No Data
Reply Children