Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Silverlight Binding
Message
From
22/08/2011 14:53:33
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
22/08/2011 13:44:49
Bill Oeftering
Mainstreet Computers, Inc.
Belleville, Michigan, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01521497
Message ID:
01521507
Views:
35
You should not have to set the storeController.Entity at all once you retrieved data it should already be on the first record.
Timothy

>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
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform