It's not easy to create a small example.
I just have one more question. I thought that with trackchanges and commitchanges the following would happen.
I start trackchanges. Everything I do with my multipage is stored in the clientState.ChangeLog.
When I call commitchanges. Everything in de ClientState.Changelog is handled server-side.
When I call for a second time in my application the trackchanges method on my multipage and commits it. De ClientState.ChangeLog consists of 2 items (in this case 2 removes) and I was expecting 1 because I already commited my first delete in the first run.
Thats the way I think it should work. Am I right?
In the foreach of the following piece of code, I found that de ClientState.Changelog isn't cleared.
| private void LoadClientState(string state) |
| { |
| JavaScriptSerializer serializer = new JavaScriptSerializer(); |
| MultiPageClientState clientState = serializer.Deserialize<MultiPageClientState>(state); |
| SelectedIndex = clientState.SelectedIndex; |
| if (clientState.ChangeLog == null) return; |
| |
| foreach (ClientStateLogEntry logEntry in clientState.ChangeLog) |
| { |
| switch(logEntry.Type) |
| { |
| case ClientStateLogEntryType.Insert: |
| PageViews.AddAt(Convert.ToInt32(logEntry.Index), new RadPageView()); |
| break; |
| case ClientStateLogEntryType.Remove: |
| PageViews.RemoveAt(Convert.ToInt32(logEntry.Index)); |
| break; |
| } |
| } |
| } |
Bert