StrataFrame Forum

Problem with AutoNavigateToSelectedrecord

http://forum.strataframe.net/Topic24971.aspx

By Ger Cannoll - 10/22/2009

I have a maintenance form with a child ListView. Working fine and I can see all the correct child records in the ListView

I now want to add in some additional tables but I cannot get the AutoNavigateToSelectedRecord to work.

On the ChildList I have the AutoNavigateToSelectedRecord set to True. I see the note that this requires the value stored in the Tag Property is the Primary key of the row. Not sure what this means , but I have entered the name of the primary key (ITR_PK) into the Tag Property of the ListView

I have a MessageBox.Show in the Navigated and Navigating  Events of the Businesobject instance ...  but these are not firing as I scroll up and down the Listview

I also have a Messagebox.Show in the SelectedIndexChanged event, to display the Primary key of the Business Object in the list. Each time it shows the Primary Key of the  First  record of the child business object......it does not appear to be changing to the record in the business object as I go up and down the list

By Edhy Rijo - 10/22/2009

Hi Gerard,



This is all done automatically by the listview internal code. All you have to do is set the "User Interface Automation" properties in the listview. Make sure you select the Business Object to be navigated by the listview. Also your PopulationDataSourceSettings should be using the BO.CopyDataFrom() to get the data from the BO.
By Ger Cannoll - 10/22/2009

Hi Edhy.

Thanks for that. Yes, I did not see the 'Business Object' property of the ListView and once I set that, its firing the Navigated event.

Many thanks again.