Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Silverlight Binding
Message
De
22/08/2011 13:44:49
Bill Oeftering
Mainstreet Computers, Inc.
Belleville, Michigan, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Silverlight Binding
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01521497
Message ID:
01521497
Vues:
108
I'm trying to follow the jump start and create a simple maintance form. I've created the domain service with my own business entity EF. I want to load the first entity when the form loads. The store controller seems to load the entities and my textbox seem to be bound but there is no value assigned. How do I set the storeController.Entity to the first entity in the entitylist ? Iwant to do something like this:
            this.storeController.Entity = this.storeController.EntityList[0];

That gives error:
Error	19	Cannot apply indexing with [] to an expression of type 'System.ServiceModel.DomainServices.Client.EntitySet<Mainstreet.GlasAve.WebQuote.Business.StoreEntity>'

// home page
   public partial class Home : mmPage
    {
        StoreControllerProxy storeController = new StoreControllerProxy();
        
         /// <summary>
        /// Creates a new <see cref="Home"/> instance.
        /// </summary>
        public Home()
        {
            InitializeComponent();

            this.Title = ApplicationStrings.HomePageTitle;
            this.storeController.GetAllEntities(delegate(object s, EventArgs e)
            {
                int cnt = this.storeController.EntityList.Count;
                this.DataContext = this.storeController.EntityList;
                
            });
        }

        /// <summary>
        /// Executes when the user navigates to this page.
        /// </summary>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }
    }
TIA Bill
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform