Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business object for WPF data grid
Message
 
À
20/07/2009 17:45:37
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01412628
Message ID:
01413473
Vues:
70
I've simplified the project, basically its only the mmBusinessWindow with an instance of the DataGrid on it. I've set the columns and their data sources in Expression Blend (essentially following the Dev Guide's "Data Binding WPF Controls" section. The codebehind code is now simply this:
   public partial class MyJokesWindow : mmBusinessWindow
    {
        private Humor Humor;
 
        /// <summary>
        /// Constructor
        /// </summary>
        public MyJokesWindow()
        {
            this.Humor = (Humor)this.RegisterBizObj(new Humor());
            //this.Window.DataContext = this.Humor.GetMyJokesByPunchline("test");
            // the above gives: "Object reference not set to an instance of an object."
            //this.Window.DataContext = this.Humor.GetAllEntities();
            //this.grdMyJokes.ItemsSource = this.Humor.GetMyJokesByPunchline("test");
            //and above gives the same error
          //  this.grdMyJokes.ItemsSource = this.Humor.GetAllEntities();
            //and above gives the same error
            this.InitializeComponent();
        }
    }
But all the commented out variations of trying to retrieve the entity list above result in the same error:
"Object reference not set to an instance of an object."

The method being called returns a set of entity objects, and works fine in the business object.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform