Aquarus
asked on
C1.Win.C1Command.C1DockingTab
Form1.cs contains the C1DockingTab with 6 pages to enter data.
The application must move from page to page automatically when the bSave_Click event is happening.
It does moving in 98% of the time. But sometime it does not. bSave_Click event happened, no errors, but new page does not get displayed. The old one does. I am trying to catch the situation but so far not successful.
Commands that supposedly does that moving from one page to the next page are these:
this.C1DockingTab.Selected Index = nextTab;
this.C1DockingTab.Selected Tab.Show() ;
Can you suggest another method so it is consistently moving from page to page?
The application must move from page to page automatically when the bSave_Click event is happening.
It does moving in 98% of the time. But sometime it does not. bSave_Click event happened, no errors, but new page does not get displayed. The old one does. I am trying to catch the situation but so far not successful.
Commands that supposedly does that moving from one page to the next page are these:
this.C1DockingTab.Selected
this.C1DockingTab.Selected
Can you suggest another method so it is consistently moving from page to page?
ASKER
I think that I must give more information of the process.
It is saving a lot of data before it must turn the page over. And there is a command right before these 2 that I posted in the initial question. The command is such:
System.Threading.Thread.Sl eep(1500).
So the code actually looks like this:
System.Threading.Thread.Sl eep(1500).
this.C1DockingTab.Selected Index = nextTab;
this.C1DockingTab.Selected Tab.Show() ;
When I commented out the Treading - the moving from tab to tab stopped being performed at all.
When I uncommented the threading - it is back to where it was - 98% of the time the tabs are switched, but in 2% - they stay in place.
May be I should catch the information about the "process before these lines" is completed.
But I don't know how.
Can you suggest?
It is saving a lot of data before it must turn the page over. And there is a command right before these 2 that I posted in the initial question. The command is such:
System.Threading.Thread.Sl
So the code actually looks like this:
System.Threading.Thread.Sl
this.C1DockingTab.Selected
this.C1DockingTab.Selected
When I commented out the Treading - the moving from tab to tab stopped being performed at all.
When I uncommented the threading - it is back to where it was - 98% of the time the tabs are switched, but in 2% - they stay in place.
May be I should catch the information about the "process before these lines" is completed.
But I don't know how.
Can you suggest?
I guess I'm having a hard time trying to visualize what you are trying to do. How are you defining "nextTab"? I don't think that is a native .NET property.
If you want to display a new tab before all code processing is complete, you will either need to do it in a different thread or use a timer control. Even when refreshing a control, it doesn't always show the refresh until the code in its thread has completed.
If you want to display a new tab before all code processing is complete, you will either need to do it in a different thread or use a timer control. Even when refreshing a control, it doesn't always show the refresh until the code in its thread has completed.
ASKER
Please read the attached document. It has a code and clarification for the question I have. Sorry it is long. But I hope it will not be a problem. In the middle of the document there is a detailed question, that I put closer to the lines of code I am having the issue with.
private-void-bSave.docx
private-void-bSave.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have found the solution myself. None of the solutions suggested by experts was used.
C1DockingTab.SelectTab(1)
C1DockingTab.SelectTab("Ta
C1DockingTab.SelectTab(Tab
If you are using the same code to go to the next tab, you can use a Private variable to keep track of which index the tab is at and increment it as the bSave_Click event is called.