Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing GridView
Message
From
28/01/2011 10:29:38
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01497645
Message ID:
01497651
Views:
33
>>Hi,
>>
>>I'm using Mere Mortals .NET 3.6 (not sure if that matters here or not).
>>
>>I've got an aspx page showing a header record and a gridview with child records displayed. I am using MM.Net's BOs but I think technically the gridview is bound to a dataset. When a value changes at the header level I need to recalculate some stuff in the child records and refresh the gridview. So I go through each datarow in the gridview's data set, recalculate one of the fields, then save the dataset to a session variable and do a GridView.DataBind().
>>
>>This does NOT show the newly calculated values, in fact the gridview disappears from the form completely.
>>
>>What am I doing wrong?
>
>What is the code you're using in the Load method of the ASP.NET form? Are you checking IsPostBack status to run your code? Also, are you saving the DS into a session variable or re-build it?

Yes I check IsPostBack:
            if (IsPostBack)
            {
                this.SetCurrentPolicy();
            }
the dataset is saved to a session variable and SetCurrentPolicy has this code in it:
                if (Session["dsPolicyRider"] != null)
                {
                    DataSet dsPolicyRider = (DataSet)Session["dsPolicyRider"];
                    this.oPolicyRider.SetCurrentDataSet(dsPolicyRider);
                }
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform