Home Forums WPF controls Xceed DataGrid for WPF CurrentItem is not being set at all.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #40327 |


    The following is the entire xaml for my page, I am trying to set the CurrentItem [ProductName] above the grid, but the values are not being set, I am using a static datasource created by blend.   Any ideas on what I am doing wrong please?

    				<ResourceDictionary Source=“/Modules.Products;component/ProjectDataSources.xaml” />
    	<Grid DataContext=”{Binding Source={StaticResource ProductSampleData}} ShowGridLines=“True”>
    			<Style TargetType=”{x:Type xcdg:DataRow}>
    				<Setter Property=“Background”
    						Value=”{x:Static xcdg:CardBackgroundBrushes.Retro} />
    			<RowDefinition Height=“Auto” />
    			<RowDefinition Height=“*” />
    		<StackPanel Orientation=“Horizontal” VerticalAlignment=“Center” HorizontalAlignment=“Center”	    Grid.Row=“0”>
    			<TextBlock Text=”{Binding ElementName=ProductGrid, Path=CurrentItem[ProductName]} FontSize=“32”/>
    		<xcdg:DataGridControl x:Name=“ProductGrid”
    							  ItemsSource=”{Binding ProductData}
    							  Background=”{x:Static xcdg:DataGridControlBackgroundBrushes.AuroraRed}>
    				<xcdg:CardflowView3D IsCardFlippingEnabled=“True”
    						<xcdg:ChameleonTheme  GradientLightColor=“LightYellow”
    											  GradientDarkColor=“Yellow” />


    Imported from legacy forums. Posted by Jay (had 1019 views)

    Xceed Support
    Post count: 5658

    Hi Jay,

    Since we don’t know how your data works in your code behind, we will first presume that the “ProductData” object is coming from a database result.

    To remedy your problem, we suggest that you try one of the two following solutions:

       Path=CurrentItem[0] (Zero being the index of the column you wish to access)

    However, if “ProductData” in the code behind was simply an object, try this instead:



    Imported from legacy forums. Posted by Sebastien [Xceed] (had 1167 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.