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

No data displaying

1 Answer 40 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Brent Hetland
Top achievements
Rank 1
Brent Hetland asked on 26 Aug 2015, 07:55 PM

Hi,

I am using version 2015.1.401.40 of your asp.net for ajax controls.

I've never used the PivotGrid, but I am experimenting with it now and I don't see any data after binding it.

Here is the markup of the grid:

<telerik:RadPivotGrid ID="AlertsRadPivotGrid" runat="server">

  <Fields>

    <telerik:PivotGridColumnField DataField="AlertLevel" UniqueName="AlertLevel" />

    <telerik:PivotGridRowField DataField="SupplierCompanyName" UniqueName="SupplierCompanyName" />

    <telerik:PivotGridAggregateField DataField="AlertID" UniqueName="AlertID" Aggregate="Count" />

  </Fields>

</telerik:RadPivotGrid>

  

Here is my code:

Private Sub AlertsRadPivotGrid_NeedDataSource(sender As Object, e As Telerik.Web.UI.PivotGridNeedDataSourceEventArgs) Handles AlertsRadPivotGrid.NeedDataSource

   Dim scAlerts As List(Of SupplierAlert)

   Dim scAlertList As SupplierAlertList = New SupplierAlertList

   scAlerts = scAlertList.GetHarmonyAlertDetailsData("129052", 8939, New Date(2015, 3, 1), New Date(2015, 10, 1), SessUserCultureCode)

   AlertsRadPivotGrid.DataSource = scAlerts

End Sub

 

So, I'm binding to a Generic List of a strongly typed object (class) that I've created.  When the code runs, the NeedDataSource method runs and the scAlerts object above has 240 SupplierAlert items in it.

I see ​bind to strongly typed lists, so I assume it is possible.

When I run it I see PivotGrid with my column and row, but there is no data / detail displayed.

Am I doing something wrong?

 

AlertLevel is an integer

SupplierCompanyID is a string

AlertID is an integer

There are no nulls in any of my data.

 

Thanks,
Brent

1 Answer, 1 is accepted

Sort by
0
Brent Hetland
Top achievements
Rank 1
answered on 28 Aug 2015, 12:18 PM

You can mark this as closed.  I don't know what I was doing wrong, but for a while I switched to using a SQLDataSource and it was working, and now I've switched back to binding to my List class and it is now working.

Tags
PivotGrid
Asked by
Brent Hetland
Top achievements
Rank 1
Answers by
Brent Hetland
Top achievements
Rank 1
Share this question
or