I am wondering if anyone could help with a problem I am having using the Infragistics ignite data grid. I am using the Infragistics.Web.Mvc .net library. The issue is that I have an array inside my list which is filling the grid. I want to be able to display each value in the array in a separate column. This works in my view for example.
@foreach (var item in Model) { var firstname = item.BillToContact.FirstName; var lastname = item.BillToContact.LastName; foreach (var number in item.BillToContact.PhoneNumbers) { @Html.DisplayFor(modelItem => firstname ) @Html.DisplayFor(modelItem => lastname ) @Html.DisplayFor(modelItem => number.Number) }} However when I try to do this inside my datagrid in any shape of form the column remains empty. I was trying simple way to output into the grid approach in the snippet below.
.Columns(col => { // problem is here col.For(c => c.BillToContact.PhoneNumbers[0].Number).HeaderText("PhoneNumbers1").Width("200px");
col.For(c => c.ID).HeaderText("ID").Width("100px"); col.For(c => c.Name).HeaderText("Name").Width("200px"); col.For(c => c.BillToContact.Name).HeaderText("BillToContactName").Width("200px"); col.For(c => c.BillToContact.Title).HeaderText("Title").Width("200px"); })
Would anyone know how to display the contents of an array were each value is in a separte column which is inside a library which is the datasource for a Infragistics ignite data grid.?
Hello AntoM,
Thank you for posting in the community.
Currently igGrid does not support binding to nested(complex) properties.
You can use the suggested approach below by creating new wrapper classes, and filling them based on the collections that you already have in place:
http://www.infragistics.com/community/forums/p/67863/344886.aspx#344886
I hope this helps.
Please let me know if you have any additional questions regarding this matter.
Would you have an example code for how one would approach.
Accounts
Customers
Hello AntonM,
I noticed that you have asked the same question in another thread in our forum: http://www.infragistics.com/community/forums/p/94347/466664.aspx#466664.
In order to ensure that all your issues are addressed correctly and you are provided with better and more accurate support our policy is to handle single thread per issue. My colleague Denis Georgiev have already provided a sample project in the mentioned thread and he will continue assisting you with this issue there.