This is a migrated thread and some comments may be shown as answers.

Custom Object Binding with Povit Grid

2 Answers 58 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Imdad Turi
Top achievements
Rank 2
Imdad Turi asked on 27 Feb 2014, 06:50 AM
hi,
i want to know how to bind a nested collection with povit grid .e.g
public class Product {

            public int ProdcutId { get; set; }
            public string ProductName { get; set; }
            public List<ProductDetail> ProductDetailCollection { get; set; }

        }

        public class ProductDetail {

            public int DetailId { get; set; }
            public string ProductClass { get; set; }
            public string ProductColor { get; set; }
            public int Qty { get; set; }
        }
and so on...

now we will bind the Collection of Product as a data source with PovitGrid. I want to know how can i bind ProductDetailCollection  with Povit grid column, i am unable to understand how we can use IValueConverter and ICompare in this case please help me to get out of this issue. waiting for your qucik rep.

Thanks

Imdad

2 Answers, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 04 Mar 2014, 08:55 AM
Hi Imdad,

Unfortunately, the RadPivotGrid could not bind its child collections automatically. In order to achieve your scenario you will need to flatten the data structure. You could create a DataTable object and loop through all Producs and its child details and manually add them to the DataTable object in order to create a flat structure.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Imdad Turi
Top achievements
Rank 2
answered on 06 Mar 2014, 11:46 AM
Hello Antonio,

got response very late for my thread but at least someone did. thank you very much.
I played with the issue alternatively something like loop as you mentioned.

Regards
Imdad
Tags
PivotGrid
Asked by
Imdad Turi
Top achievements
Rank 2
Answers by
Antonio Stoilkov
Telerik team
Imdad Turi
Top achievements
Rank 2
Share this question
or