Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GridView Binding question
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
GridView Binding question
Divers
Thread ID:
01257549
Message ID:
01257549
Vues:
49
Is there something in the MM.Net page class that causes a GridView to fire it's RowDataBound event automatically on postback and when it's bixobj is changed?

I have a bixobj that is the BindingSource for a GridView that I'm repopulating on postback and when I call the method to repopulate the EntityList the RowDatabound event of the gridview is fired and seems to catch the bizobj in some intermediate state.

It works OK if I repopulate immdeiately on postback in the Page_Load (yes, I'm checking for IsPostBack), but if I repopulate in any other method I get errors.

What I have is a list of week date ranges(Mod - Fri) in a dropdownlist. Changing the year in a year dropdownlist causes an autopostback to repopulate the week range dropdownlist. If the year is the current year the week range that contains today's date is automatically selected otherwise the first week of the year is selected.

A stored proc is called when a week is selected that populates the EntityList with totals for that week. It works fine if I catch the ddlWeek.SelectedValue in the Page_Load. It will fail if I wait until the ddlWeek_SelectedIndexChanged because the RowDatabound fires before I've populated the BizObj EntityList. When I rebulld the week list by calling a method in the ddlYear_SelectedIndexChanged and then try to repopulate the EntityList the GridView-RowDataBound fires. I this a Page level method response to a change in a Registered Biz Obj?
Regards,

E.R. Gilmore
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform