Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
830
Child Refreshing
posted

I have a collection of BLPerson objects which I bind to a grid via a bindingsource as shown in the psuedo code below. The BLPerson object conatins a child which is a collection of BLUserid objects.

BLCollection<BLPerson> AllPeople = GetPeople();  /*go to db and get all people*/
bLPersonBindingSource.DataSource = AllPeople;
this.PersonGrid.DataSource=bLPersonBindingSource

when the User clicks on the "+" of the parent to  display the Userids, i do the following (in the BeforeRowExpanded) in an attempt to force the child data to be refreshed from the database. But the data is not refreshed. I know this because i have manually added a row to the database before expanding the parent and it doesn't show.

AllPeople = GetPeople()
this.bLPersonBindingSource.ResetBindings(false);
this.PersonUltraGrid.ActiveRow.Refresh(RefreshRow.ReloadData,true);

Can anyone explain what i should be doing to ensure that when a parent is expanded, the child data is retrieved from the db and displayed.

Thanks jv