Hi,
I use the XamPivotGrid and XamPivotDataSelector in an WPF Browser Application.
When I drag and drop a field, the XamPivotGrid(or XamPivotDataSelector ) bacome black.
Please help me.
Here is my code:
[xaml]
<Page x:Class="Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366" Title="Page1" xmlns:ig="http://schemas.infragistics.com/xaml"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <ig:XamPivotGrid Name="XamPivotGrid_Result" AllowCompactLayout="True" /> <ig:Expander Grid.Column="1"> <ig:XamPivotDataSelector Name="XamPivotDataSelector_Result" /> </ig:Expander> </Grid></Page>
[xaml.vb]
Imports System.WindowsImports System.Windows.ControlsImports System.DataImports System.Data.SqlClientImports System.ReflectionImports Infragistics.OlapImports Infragistics.Olap.FlatDataClass Page1 Dim QueryTable As New DataTable With {.TableName = "QueryTable"} Public Sub New() InitializeComponent() BuildDataSource() End Sub Private Sub BuildDataSource() Dim column1 As DataColumn column1 = New DataColumn QueryTable.Columns.Add(New DataColumn("col1", GetType(String))) QueryTable.Columns.Add(New DataColumn("col2", GetType(String))) QueryTable.Columns.Add(New DataColumn("val1", GetType(Int32))) QueryTable.Columns.Add(New DataColumn("val2", GetType(Int32))) For indexA = 1 To 30 Dim row As DataRow row = QueryTable.NewRow() row("col1") = "Joe" row("col2") = "US" row("val1") = indexA row("val2") = indexA * indexA QueryTable.Rows.Add(row) Next indexA Dim typeBuilder As New DynamicTypeBuilder() With { _ .DynamicAssemblyName = "MyAssembly", _ .DynamicTypeName = QueryTable.TableName _ } Dim properties As IList(Of DynamicTypePropertyInfo) = New List(Of DynamicTypePropertyInfo)() For Each column As DataColumn In QueryTable.Columns Dim PropertyInfo As New DynamicTypePropertyInfo() With { _ .PropertyName = column.ColumnName, _ .PropertyType = column.DataType _ } properties.Add(PropertyInfo) Next Dim dynamicType As Type = typeBuilder.GenerateType(properties) Dim listType As Type = GetType(List(Of )) Dim genericListType As Type = listType.MakeGenericType(dynamicType) Dim list As IList = DirectCast(Activator.CreateInstance(genericListType), IList) For Each dataRow As DataRow In QueryTable.Rows Dim myDynamicInstance As Object = Activator.CreateInstance(dynamicType) For Each column As DataColumn In QueryTable.Columns Dim propertyVal As PropertyInfo = dynamicType.GetProperty(column.ColumnName) If IsDBNull(dataRow(column)) = False Then propertyVal.SetValue(myDynamicInstance, dataRow(column), Nothing) End If Next list.Add(myDynamicInstance) Next Dim flatDataSource As New FlatDataSource() With { .ItemsSource = list, _ .Cube = DataSourceBase.GenerateInitialCube(QueryTable.TableName), .Columns = DataSourceBase.GenerateInitialItems("[col1].[col1]"), .Rows = DataSourceBase.GenerateInitialItems("[col2].[col2]"), .Measures = DataSourceBase.GenerateInitialItems("val1") } XamPivotGrid_Result.DataSource = flatDataSource XamPivotDataSelector_Result.DataSource = flatDataSource End SubEnd Class
Hello dualrex,
I have created case CAS-78143-YFVZ38 for you and linked development issue 94705 to this case. Development issue 94705 is in "Awaiting Release" state. You will be notified when the fix for this issue is released.
You’ll be able to access this support case from the My Support Activity page: <https://ko.infragistics.com/Membership/MySupport.aspx>
Please let me know if you have any questions on this matter.
Hello Plamen and Asma,
Thank you for help so soon, i will wait the next update.
-dualrex
Hello,
This issue has been resolved in the latest service release.
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support