This question is locked. New answers and comments are not allowed.
i am using the following code to set the itemsource property to a GridView to a collection. But after setting the itemsource, when i try to access the items[0], I get an exception that there are no elements, event though the itemssource has some elements.
--------------------------------------------------------------------------
this
.dgiEmail.ItemsSource = value;
this.dgEmail.Rebind();
if (ViewModel.SelectedEmailResults.Count == 0)
{
if (this.emailItemList1.Count > 0)
{
this.dgEmail.SelectedItem = this.dgEmail.Items[0];
}
}
