Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Values not being populated
Message
 
À
19/03/2013 10:01:23
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01568779
Message ID:
01568811
Vues:
46
Frank,

>I have a XAML form based on mmBusinessWindow.
>
>If I start the form and hit New, my default values get displayed on the form.
>
>If I start the form and run a search process to find data then hit the New button, my default values do not get displayed.
>
>Based on advice from Oak Leaf my search does this after finding data:
>
>
this.DataContext = this.CourierAirWayBill.DataSet.Tables[this.CourierAirWayBill.TableName].DefaultView;
>
>in order to show data from a display only view of the data (basically, I am showing data from related tables).
>
>The code I have in the New Button's click method is this:
>
>
        private void btnNew_Click(object sender, RoutedEventArgs e)
>        {
>            this.IgnoreNavigation = true;
>            if (this.grdCourierAirWayBills.Items.Count == 0)
>            {
>                this.DataContext = this.CourierAirWayBill.EntityList;
>                //this.DataContext = this.CourierAirWayBill.DataSet.Tables[this.CourierAirWayBill.TableName].DefaultView;
>            }
>            this.grdCourierAirWayBills.SelectedItem = this.CourierAirWayBill.Entity;
>            this.IgnoreNavigation = false;
>
>        }
>
>I believe the problem is because I'm setting the DataContext to the EntityList, but when I try the commented line of code it doesn't work either.

It's very difficult to figure out what's going on from here. I recommend contacting Josh on this one!

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform