|
Group: Forum Members
Posts: 57,
Visits: 277
|
Having sorted the problem with the data binding to custom fields I have come across the following issue:
On my dataview grid I have 4 columns, user name, description, computer name(custom) and logged in flag(custom)
The username,description are loaded from UserNameBO and computer name and logged in are loaded from UserProfilesBO.
I have 3 buttons Add User, Edit User, Delete User.
Edit User: This transfers control to another form that allows me to change parameters associated with the user. When I return to the calling form I reload the UserameBO to refresh the data view grid. I then get the error:
Thd following exception occurred in the DataGridView:
System.Reflection.TargetInvocationExceptions: Exception has bee thrown by the target of an invocation,-->
System.InvalidCastException: Specified cats is not valid.
at ........HLSUserNamesBO.get_loggedIn() followed by line no.
I presume this error is due the fact that the computerName and loggedIn are not being refreshed when I refresh the usernames. Could anyone throw some light on this issue, or is there some event I should be setting similar to the parentLoading.
Many thanks
|