System.NullReferenceException

2 posts, 0 answers
  1. Russell
    Russell avatar
    2 posts
    Member since:
    Nov 2017

    Posted 26 Nov 2017 Link to this post

    Hi,

    I am testing DataGrid for my first mobile app.  

    If I set AutoGenerateColumns="True" then everything works great.

    But if I try to manually create the columns in xaml, my app crashes in iOS.  I get an System.NullReferenceException on the "AppDelegate" line in main.cs.   I know I am setting the grid.ItemsSource to a valid List because AutoGenerateColumns is showing them.

    Any ideas?

  2. Russell
    Russell avatar
    2 posts
    Member since:
    Nov 2017

    Posted 26 Nov 2017 Link to this post

    Please ignore.  I was using the single line grid creation in xaml and when I switched to defining my own columns, I did not remove the / from the /> and so my grid didnt exist after this line.  doh!
Back to Top