Hi,
I am creating RadPivotGrid fields on page load programmatically, but when ı drag and drop any fields to another area (column,row,data etc.) all fields are disappear and no data available.Here is the server side vb code. Can anyone help me what is the reasen of this?
RadPivotGrid1.EmptyValue = ""
RadPivotGrid1.ColumnHeaderCellStyle.Width = New Unit(90)
RadPivotGrid1.ClientSettings.Scrolling.AllowVerticalScroll = True
Dim JSs = New AdvancedJavaScriptSerializer()
Dim lstPivotGridField As List(Of PivotGridFieldItem) = JSs.Deserialize(Of List(Of PivotGridFieldItem))(Request.Params("lstPivotGridField"))
For Each PGField In lstPivotGridField
If PGField.DataField.Trim = "" Then
Continue For
End If
Dim Field As PivotGridField = Nothing
Select Case PGField.Group
Case 0
Field = New PivotGridColumnField()
Case 1
Field = New PivotGridRowField()
Case 2
Field = New PivotGridReportFilterField()
Case 3
Dim AggField = New PivotGridAggregateField()
Select Case PGField.Type
Case 0
AggField.Aggregate = PivotGridAggregate.Sum
Case 1
AggField.Aggregate = PivotGridAggregate.Count
Case 2
AggField.Aggregate = PivotGridAggregate.Average
Case Else
Continue For
End Select
AggField.Caption = PGField.Caption
AggField.DataField = PGField.DataField
AggField.UniqueName = PGField.DataField
AggField.DataFormatString = "{0:F2}"
AggField.TotalFormatString = "{0:F2}"
RadPivotGrid1.Fields.Add(AggField)
Continue For
Case Else
Continue For
End Select
Field.Caption = PGField.Caption
Field.DataField = PGField.DataField
Field.UniqueName = PGField.DataField
RadPivotGrid1.Fields.Add(Field)
Next
----------------------------------------- ASPX CODE BEHIND --------------------------------------------------------------
<telerik:RadMultiPage runat="server" ID="CubeReportMultiPage">
<telerik:RadPageView runat="server" ID="pwTablo">
<telerik:RadAjaxPanel ID="radAjaxPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<telerik:RadPivotGrid RenderMode="Lightweight" runat="server" ID="RadPivotGrid1" AllowFiltering="true" AllowPaging="true" ShowFilterHeaderZone="false" OnPivotGridCellExporting="RadPivotGrid1_PivotGridCellExporting" OnCellDataBound="RadPivotGrid1_CellDataBound">
<ClientSettings EnableFieldsDragDrop="true">
<Scrolling AllowVerticalScroll="true"></Scrolling>
</ClientSettings>
</telerik:RadPivotGrid>
</telerik:RadAjaxPanel>
</telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pwGrafik">
<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Visible="true" Legend-Appearance-Position="Top"
PlotArea-YAxis-LabelsAppearance-DataFormatString="C" PlotArea-XAxis-LabelsAppearance-RotationAngle="45">
</telerik:RadHtmlChart>
</telerik:RadPageView>
</telerik:RadMultiPage>