What could be wrong in the following code?
[CODE]
<Page xmlns:my="clr-namespace:Xceed.Wpf.DataGrid;assembly=Xceed.Wpf.DataGrid" x:Class="TimeSheetClient.TimeSheet"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="TimeSheet" xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
<Grid>
<Grid.Resources>
<xcdg:DataGridCollectionViewSource x:Key="cvs_usersgroups" Source="{Binding Source ={x:Static Application.Current}, Path=UsersGroups}" />
</Grid.Resources>
<my:DataGridControl Name="UsersGroupsGrid" AutoCreateDetailConfigurations="True" ItemsSource="{Binding Source={StaticResource cvs_usersgroups}}">
<my:DataGridControl.View>
<xcdg:TableView UseDefaultHeadersFooters="False">
<xcdg:TableView.Headers>
<DataTemplate>
<xcdg:InsertionRow />
</DataTemplate>
</xcdg:TableView.Headers>
<xcdg:TableView.FixedHeaders>
<DataTemplate>
<xcdg:HierarchicalGroupByControl xcdg:TableView.CanScrollHorizontally="False" />
</DataTemplate>
<DataTemplate>
<xcdg:ColumnManagerRow />
</DataTemplate>
</xcdg:TableView.FixedHeaders>
<xcdg:TableView.Theme>
<xcdg:AeroNormalColorTheme />
</xcdg:TableView.Theme>
</xcdg:TableView>
</my:DataGridControl.View>
</my:DataGridControl>
</Grid>
</Page>
[/CODE]
and code behind:
[CODE]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TimeSheetClient.TimeSheetServiceReference;
namespace TimeSheetClient
{
/// <summary>
/// Interaction logic for TimeSheet.xaml
/// </summary>
public partial class TimeSheet : Page
{
private static TimeSheetDataSet.UsersGroupsDataTable usersGroups;
public static TimeSheetDataSet.UsersGroupsDataTable UsersGroups
{
get { return TimeSheet.usersGroups; }
}
static TimeSheet()
{
TimeSheetServiceClientInstance serviceClientInstance = TimeSheetServiceClientInstance.Instance;
usersGroups = serviceClientInstance.serviceClient.UsersGroups();
}
public TimeSheet()
{
InitializeComponent();
}
}
}
[/CODE]
i dont get data in the grid not even the columns as well. i did something like the example in the documentation.