| | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 11/22/2008 2:28:31 AM Posts: 152, Visits: 540 |
| When I use the following code to navigate from the toolbar, I get an error (recordID) which is the primary key of my table is zero. Everything works fine if the table has records. Michael Private Sub BO_Navigated(ByVal e As MicroFour.StrataFrame.Business.NavigatedEventArgs) Handles BuildTypeBO1.Navigated SetListViewIndex(BuildTypeBO1.RecordID) End Sub |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 12/02/2008 4:42:46 PM Posts: 2,686, Visits: 1,890 |
| | If there are no records, then accessing any strong-typed property will throw an error. The easiest way to avoid this is to test on the count of the business object like this: If BuildTypeBO1.Count > 0 Then SetListViewIndex(BuildTypeBO1.RecordID) End If
www.bungie.net |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 11/22/2008 2:28:31 AM Posts: 152, Visits: 540 |
| | | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 12/02/2008 4:42:46 PM Posts: 2,686, Visits: 1,890 |
| | |
|
|