Last Updated: 28 Mar 2019 16:23 by ADMIN
jose antonio
Created on: 11 Aug 2016 10:53
Category: PivotGrid
Type: Bug Report
dynamic pivot
When setting datasource if the data is a dynamic type it wont render anything.

My type is IEnumerable<dynamic>

1 comment
Posted on: 28 Mar 2019 16:20
Hello Jose,

The pivot grid does not have a property similar to this:
<telerik:RadGrid ... AllowFilteringByColumn="true">

And although something like this should work:
protected void RadPivotGrid1_NeedDataSource(object sender, PivotGridNeedDataSourceEventArgs e)
    IEnumerable<dynamic> source = Enumerable.Range(1, 6).Select(x => new
        TextField = "Item " + x,
        ValueField = x
    RadPivotGrid1.DataSource = source;

You will still need to add the pivotgrid fields manually. Even then, I am afraid this kind of binding is not tested on our side and we do not guarantee that all the functionality like paging, sorting, filtering, etc. will work flawlessly.

What is supported out-of-the-box, however, is creating the grid programmatically:
-  Demo: PivotGrid Programmatic Creation
-  Docs: PivotGrid Programmatic Creation

Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.