Hi, i have Telerik version Q3 2012 , Oracle DB 10, VS 2005.
I try in all the way to bind data to RadPivot but no way, nothing happens. I tried with ObjectDataSource and with Advanced Data...but i failed.
Do i need a specific DDL ? or another version of Telerik ?
Anyway give a look to what i produce and tell me please where is the mistake.
<telerik:RadPivotGrid runat="server" ID="RadPivotGrid1" AllowFiltering="true"
AllowPaging = "true"
Width="800px" Height="400px"
AllowSorting="true"
ShowFilterHeaderZone="true"
OnNeedDataSource="RadPivotGrid1_NeedDataSource" >
<ClientSettings EnableFieldsDragDrop="true">
<Scrolling AllowVerticalScroll="true"></Scrolling>
</ClientSettings>
<Fields>
<telerik:PivotGridRowField DataField="attivita">
</telerik:PivotGridRowField>
<telerik:PivotGridColumnField DataField="liv_auto">
</telerik:PivotGridColumnField>
<telerik:PivotGridAggregateField DataField="q_ta" Aggregate="Sum">
</telerik:PivotGridAggregateField>
</Fields>
</telerik:RadPivotGrid>
In vb file :
Protected Sub RadPivotGrid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.PivotGridNeedDataSourceEventArgs) Handles RadPivotGrid1.NeedDataSource
TryCast(sender, RadPivotGrid).DataSource = GetDataTable("SELECT * FROM lbrms_libretto_vw where matri=17720")
End Sub
Public Function GetDataTable(ByVal query As String) As DataTable
Dim ConnString As [String] = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim conn As New OracleConnection(ConnString)
Dim adapter As New OracleDataAdapter()
adapter.SelectCommand = New OracleCommand(query, conn)
Dim myDataTable As New DataTable()
conn.Open()
Try
adapter.Fill(myDataTable)
Finally
conn.Close()
End Try
Return myDataTable
End Function
NeedDataSource fires and the DataTable contains data. But Pivot show no data.
I guess maybe the structure of my Oracle Table is not good for Pivot ?
ID Activity Level_Activity Quantity
-- --------- ------------------- -----------
1 A High 20
2 A Low 10
3 B High 12
and so on.....
SomeOne can help me ?
Thanks Maurizio