>>>>>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);
>>> }
>>
>>What is this.oPolicyRider - is it a BO? Should you somehow re-bind the grid after setting the DataSet?
>
>Yes, it's a BO. I think the MM.NET handles the re-binding, but how do I do that manually? GridView.DataBind()? If so I've tried that and it doesn't work.
I know you got this solved with Naomi but wanted to add this comment. MM will do the rebinding but only if you update the business objects data. You were updating the dataset but not setting it back onto the business object. And that of course isn't needed so the solution you got is just fine. Just wanted to clear up that conception of the mm doing the re-binding for you. It will if you update the BO
Tim
Timothy Bryan