- a web page
- 2 DataGridViews (parent/child relationship)
- user wants to insert a new record into parent grid
- parent grid has datasource set to Nothing so that EmptyDataTemplate shows
- EmptyDataTemplate contains a DetailView
- user fills in fields and clicks Insert
- the parent record saves correctly; and
- the page refreshes; but
- an error occurs because the child grid is linked to an empty Parent grid.
- No amount of fiddling with the SelectedItem property of the Parent grid seems to work.
- Hide the second grid until the user manually makes a selection on the Parent grid.
Other related posts:
Geek Post Monthly Newsletter Volume 2 Issue 6
Exam 70-300 Objective 3
COALESCE T-SQL Function
Add a comment
Please note: comments that are inappropriate or promotional in nature will be deleted.
E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.
Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.