Having trouble adding rows to DataGrid in WPF

I have create a DataGrid in WPF in XAML and now I want to add some rows.   Here is the XAML Code segement

        <DataGrid x:Name="DataGridResults" HorizontalAlignment="Left" Height="171" Margin="68,151,0,0" VerticalAlignment="Top" Width="715" Initialized="DataGridResults_Initialized" SelectionChanged="DataGridResults_SelectionChanged">
            <DataGrid.Columns>
                <DataGridTextColumn x:Name="ColumnMode" Header="Mode"/>
                <DataGridTextColumn x:Name="ColumnCyan" Header="Cyan"/>
                <DataGridTextColumn x:Name="ColumnMagenta" Header="Magenta"/>
                <DataGridTextColumn x:Name="ColumnYellow" Header="Yellow"/>
                <DataGridTextColumn x:Name="ColumnBlack" Header="Black"/>
                <DataGridTextColumn x:Name="ColumnTotal" Header="Total" FontWeight="Bold"/>
                <DataGridTextColumn/>
            </DataGrid.Columns>
        </DataGrid>

It has 6 columns.
I created a Class as

    public class Cost
    {
        public string Mode { set; get; }
        public Single Cyan { set; get; }
        public Single Magenta { set; get; }
        public Single Yellow { set; get; }
        public Single Black { set; get; }
        public Single Total { set; get; }
 
    }

so, to add a row to the grid, i should just do
            DataGridResults.Items.Add(new Cost() { Mode = "Test", Cyan = 0.025f, Magenta = .026f, Yellow = .027f, Black = .028f, Total = .198f });
DataGridsResult is my DataGrid....

I end up with a blank row.  It adds the row, but not populated.  
What am I missing?

thanks!
roujeskyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

roujeskyAuthor Commented:
it seems weird, because it created a row, but it is not populated.  it is an empty row....
0
Bob LearnedCommented:
I would think that it would be easier if you have an ObservableCollection of entities, and then set the DataGrid.ItemSource to the collection.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.