Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when binding to mmGridView
Message
From
01/07/2010 15:35:13
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error when binding to mmGridView
Miscellaneous
Thread ID:
01471237
Message ID:
01471237
Views:
88
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
Next
Reply
Map
View

Click here to load this message in the networking platform