Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error when binding to mmGridView
Message
De
01/07/2010 15:35:13
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Error when binding to mmGridView
Divers
Thread ID:
01471237
Message ID:
01471237
Vues:
86
Hi,

I have a GridView on a form which is giving me this error:

Unable to cast object of type 'OakLeaf.MM.Main.Web.UI.WebControls.mmGridView' to type 'OakLeaf.MM.Main.Web.UI.ImmWebBindingSimple'.

When I do this:
            this.oPolicyRider.NewRow(dsPolicyRider, this.oPolicyRider.TableName);
            Guid newPK = (Guid)dsPolicyRider.Tables[0].Rows[dsPolicyRider.Tables[0].Rows.Count - 1]["PolicyRiderPK"];

            // Get the list of Riders & Waivers available for this plan
            this.dsRiders = this.oPlan.GetRidersAndWaiversByPlan(this.oPolicy.Entity.PlanFK);
            // default the Rider to the first item in the Riders data session
            dsPolicyRider.Tables[0].Rows[dsPolicyRider.Tables[0].Rows.Count - 1]["RiderFK"] = this.dsRiders.Tables[0].Rows[0]["PlanPK"];

            // default the CountryFK to the first item in the Country data session
            //dsAddress.Tables[0].Rows[dsAddress.Tables[0].Rows.Count - 1]["CountryFK"] = this.oCountry.DataSet.Tables[0].Rows[0]["CountryPK"];

            this.BindControl(this.grdRiders);
The error occurs on the BindControl line.

I've done many grids like this and not seen this error before, so I figure it's something simple but can't see what is wrong.

Any help appreciated.

I've done many grids like this
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform