I started to use the ProjectEdit functionality exposed by Rocky in WEB ProjectTracker project. But DetailsView control give me an ugly issue: Insert and Update are working fine only for the first press of these buttons. My object has errors so, when I press insert button first time, all error are displayed properly in label error. If I will press insert button again, details view become invisible.
Bellow is the list of events when I press insert button first time:
1. DetailsView1_ItemCreated. It allows to fill values of controls from DetailsView:
If DetailsView1.DefaultMode = DetailsViewMode.Insert Then Dim obj As RootObject = GetObject() -------------
If DetailsView1.DefaultMode = DetailsViewMode.Insert Then
Dim obj As RootObject = GetObject()
2. BusinessRootDataSource_InsertObject. It calls Save method that returns 0 reccords affected and set properly text of label error.
3.DetailsView1_ItemInserted is invoked: it keeps DetailsView in insert mode: e.KeepInInsertMode = True
This is the right behaviour!
Second time when I press Insert Button, DetailsView1.DefaultMode is ReadOnly and DetailsView become invisible. BusinessRootDataSource_InsertObject and DetailsView1_ItemInserted are skipped! DetailsView1.Rows.Count became 0!
A similar behaviour has Cancel Button also. First time is working properly, but, the second time when is pressed it sets displayview default mode in readonly
Many Thanks and HNY for all of you!
Business object and asp net page are working properly. There is an issue in master page related with aspx splitter control! I cheked all project step by step and finally I discover the problem.
I consider closed this problem!
After two days I discovered that object and aspx page are working perfectly. My project uses Devexpress controls and Master page created based on DevExpress Template. All above issues are related with ASPxSplitter control used in my Master page. I create a new Master page without this control and all is fine. But I like how it appears my pages before, so, I will continue to investigate what exactly is responsible for above issues.
Copyright (c) Marimer LLC