locked
DisplayMemberBinding property is giving a error called "The property 'DisplayMemberBinding' was not found in type 'DataGridTextColumn' RRS feed

  • Question

  • Hi All,

    I am trying to display data from database on Data Grid on .Xamal file but when i trying to binding data by using a property called: DisplayMemberBinding, but its showing some error like this,

    """  The property 'DisplayMemberBinding' was not found in type 'DataGridTextColumn """"

    Here is my total Xamal Code::

    _______________________________

    <

     

    UserControl xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:Class="SLDB.Page"

     

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

     

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

     

    Width="400" Height="300">

     

     

    <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">

     

     

    <Grid.RowDefinitions >

     

     

    <RowDefinition Height="*"/>

     

     

     

    </Grid.RowDefinitions>

     

     

    <Grid.ColumnDefinitions >

     

     

    <ColumnDefinition Width="*"/>

     

     

    </Grid.ColumnDefinitions >

     

     

    <my:DataGrid x:Name="FeedGrid" AlternatingRowBackground="Beige"

     

    AutoGenerateColumns="False"

     

    Width="800" Height="300"

     

    Grid.Row="1" Grid.Column="1"

     

    CanUserResizeColumns="True">

     

     

    <my:DataGrid.Columns>

     

     

    <my:DataGridTextColumn Header="Name" Width="50" DisplayMemberBinding="{Binding name}" FontSize="11" />

     

     

    <my:DataGridTextColumn Header="Email" Width="120" DisplayMemberBinding="{Binding email}" FontSize="11" />

     

     

    <my:DataGridTextColumn Header="Message" Width="120" DisplayMemberBinding="{Binding message}" FontSize="11" />

     

     

    <my:DataGridTextColumn Header="City" Width="120" DisplayMemberBinding="{Binding city}" FontSize="11" />

     

     

    <my:DataGridTextColumn Header="Date" Width="120" DisplayMemberBinding="{Binding date}" FontSize="11" />

     

     

    </my:DataGrid.Columns>

     

     

    </my:DataGrid>

     

     

    </Grid>

    </

     

    UserControl>

    Please help me if any once knows the solution.

    Thanks in advance..
    Wednesday, January 27, 2010 11:18 AM

Answers

All replies